Skip to content

Remove tzset from shared_utils.rt_utils (#2029)#2030

Merged
mrtopsyt merged 2 commits intomainfrom
2029-remove-tzset
Apr 29, 2026
Merged

Remove tzset from shared_utils.rt_utils (#2029)#2030
mrtopsyt merged 2 commits intomainfrom
2029-remove-tzset

Conversation

@mrtopsyt
Copy link
Copy Markdown
Contributor

Summary

shared_utils.rt_utils sets a timezone environment variable and uses time.tzset. This function is not defined on Windows, preventing local development with shared_utils, but does not seem to be necessary and could lead to unexpected behavior if users are not aware that the import is changing their timezone.

Changes

  • Removed time.tzset from shared_utils.rt_utils
  • Bumped version

Testing

  • On Windows ran uv run --group test pytest from the shared_utils directory and confirmed all tests pass
  • Ran some cells in gtfs_digest/report_caltrans_district, received expected output

@mrtopsyt mrtopsyt requested a review from edasmalchi April 29, 2026 19:47
Copy link
Copy Markdown
Member

@edasmalchi edasmalchi left a comment

Choose a reason for hiding this comment

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

looks good, thanks!

@mrtopsyt
Copy link
Copy Markdown
Contributor Author

sorry for the pre-commit mistake! merging now

@mrtopsyt mrtopsyt merged commit e6e82b9 into main Apr 29, 2026
2 checks passed
@mrtopsyt mrtopsyt deleted the 2029-remove-tzset branch April 29, 2026 22:07
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.

Bug: shared_utils.rt_utils cannot be imported on non-unix environments

2 participants