Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Timezone support to receive_time and update tests (adjusted-time-failure) #158

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

tyeth
Copy link
Contributor

@tyeth tyeth commented Sep 18, 2024

This PR is to add the timezone argument to receive_time, allowing users to request specific timezones rather than rely on autodetection.

This also reduces the flakiness of the test test_time_data which would intermittently fail depending if is_DST was 0 or 1 when the time struct was returned from the time service (GitHub runners are UTC and so is_DST=1 would fail when time struct passed to time.mktime)

@tyeth tyeth force-pushed the update-tests-adjusted-time-failure branch from a592bfb to 84577df Compare September 18, 2024 16:56
@tyeth tyeth changed the title Update-tests-adjusted-time-failure Add Timezone support to receive_time and update tests (adjusted-time-failure) Sep 18, 2024
@tyeth tyeth marked this pull request as ready for review September 18, 2024 16:57
@tyeth tyeth requested a review from brentru September 18, 2024 16:58
@tyeth
Copy link
Contributor Author

tyeth commented Sep 18, 2024

Hey @brentru, this is ready for review.
We had a failure on CI due to time.mktime not accepting is_DST=1 for the github runners timezone of UTC.

This adds UTC timezone to the test's request, along with adding support for requesting the timezone via receive_time.

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, no comments. You may want to release after this PR is merged so PyPi picks this new timezone change up.

@tyeth tyeth merged commit 68ff68d into master Sep 26, 2024
@tyeth tyeth deleted the update-tests-adjusted-time-failure branch September 26, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants