FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

chore(tests): fix timezone test by daniel-sanche · Pull Request #1069 · googleapis/python-firestore · GitHub

This repository was archived by the owner on Mar 2, 2026. It is now read-only.

chore(tests): fix timezone test - #1069

Merged
gkevinzheng merged 1 commit into
mainfrom
fix_timestamp_test
Jun 18, 2025
Merged

chore(tests): fix timezone test#1069
gkevinzheng merged 1 commit into
mainfrom
fix_timestamp_test

Conversation

Copy link
Copy Markdown
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 requested review from a team June 17, 2025 23:45
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 merged commit e6fd577 into main Jun 18, 2025
gkevinzheng deleted the fix_timestamp_test branch June 18, 2025 19:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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


Back | FazBrowse Home | New Git URL