From 82732d021d2d7e3bcc5d0d4f26b14f25700f3764 Mon Sep 17 00:00:00 2001 From: Achal Shah Date: Tue, 29 Mar 2022 12:27:15 -0700 Subject: [PATCH] fix: Use dateutil parser to parse materialization times Signed-off-by: Achal Shah --- sdk/python/feast/cli.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/python/feast/cli.py b/sdk/python/feast/cli.py index d2a71bc561..8ac61fc514 100644 --- a/sdk/python/feast/cli.py +++ b/sdk/python/feast/cli.py @@ -21,6 +21,7 @@ import pkg_resources import yaml from colorama import Fore, Style +from dateutil import parser from feast import flags, flags_helper, utils from feast.constants import DEFAULT_FEATURE_TRANSFORMATION_SERVER_PORT @@ -40,7 +41,6 @@ ) _logger = logging.getLogger(__name__) -DATETIME_ISO = "%Y-%m-%dT%H:%M:%s" class NoOptionDefaultFormat(click.Command): @@ -490,8 +490,8 @@ def materialize_command( store = FeatureStore(repo_path=str(repo)) store.materialize( feature_views=None if not views else views, - start_date=utils.make_tzaware(datetime.fromisoformat(start_ts)), - end_date=utils.make_tzaware(datetime.fromisoformat(end_ts)), + start_date=utils.make_tzaware(parser.parse(start_ts)), + end_date=utils.make_tzaware(parser.parse(end_ts)), )