Skip to content

Conversation

@daniel-sanche
Copy link
Contributor

test_aggregation_query_get_stream_iterator_read_time_different_timezones currently fails when run in non-utc timezones

This section will build a different datetime value depending on the local machine's clock, since it's all based on a naive timestamp:

read_time = datetime(1970, 1, 1, 0, 30)
if timezone is not None:
    read_time = read_time.astimezone(timezone)

But the assertion assumes that the resulting timestamp value will be a fixed time in utc:

expected_timestamp = Timestamp(seconds=1800)

To fix this, I changed it to use datetime.fromtimestamp(1800, tz=custom_timezone)

@daniel-sanche daniel-sanche requested review from a team as code owners June 17, 2025 23:45
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: firestore Issues related to the googleapis/python-firestore API. labels Jun 17, 2025
@gkevinzheng gkevinzheng merged commit e6fd577 into main Jun 18, 2025
24 checks passed
@gkevinzheng gkevinzheng deleted the fix_timestamp_test branch June 18, 2025 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: firestore Issues related to the googleapis/python-firestore API. size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants