Skip to content
Shihao Qi
Projects
Writing
Notes
Search
About
中
TAG
Time
Everything filed under this tag.
1 entries
01
Notes
time.strftime uses the system time zone: write with the configured zone, read with the system one, green locally and a day off on UTC CI
2026-10-17
The project had a helper that takes today’s date in the configured time zone, and scattered time.strftime("%Y-%m-%d") calls next to it. On a dev machine whose zone matches the config, both always agree; CI runs in UTC, and between midnight and 8 a.m. Beijing time the reading side goes looking for yesterday’s file.
#Python
#Time
#Testing
← All tags
Search the site