Skip to content

Commit 72a1784

Browse files
committed
Fix naive local default for end_date in get_historical_features
When entity_df is None, end_date defaulted to datetime.now(), a naive host-local wall-clock timestamp. Offline stores interpret naive datetimes as UTC, so the retrieval window shifts by the host's UTC offset (rows missing west of UTC, future rows returned east of it). Default to datetime.now(tz=_timezone.utc), matching the existing usage of the same expression in this file. Signed-off-by: NUAAwqy <146524024+NUAAwqy@users.noreply.github.com>
1 parent 7903e2e commit 72a1784

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎sdk/python/feast/feature_store.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2087,7 +2087,7 @@ def get_historical_features(
20872087
)
20882088

20892089
if entity_df is None and end_date is None:
2090-
end_date = datetime.now()
2090+
end_date = datetime.now(tz=_timezone.utc)
20912091

20922092
_feature_refs = utils._get_features(
20932093
self.registry, self.project, features, allow_cache=True

0 commit comments

Comments
 (0)