Repository navigation
fix(codes): read GST as Guam Standard Time, as the services do - #455
Merged
Merged
Conversation
codes.timezones mapped GST to UTC+4 (Gulf Standard Time). The USGS time-zone codes and the WQX TimeZone domain both define GST as Guam Standard Time, UTC+10, so the DateTime columns that wqp.get_results() and waterdata.get_samples() append placed a time stamped GST at 10:00 local at 06:00 UTC instead of 00:00 UTC. utils.format_datetime shares the table. HDT, a USGS code for Hawaii-Aleutian Daylight Time (UTC-9), was missing and became NaT.
yang00333
force-pushed
the
fix/guam-time-zone
branch
from
October 16, 2026 14:11
154389b to
a46f1e5
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #454
codes.timezonesmappedGSTto UTC+4 (Gulf Standard Time). The USGS time-zone codes (https://help.waterdata.usgs.gov/tz) and the WQX TimeZone domain both defineGSTas Guam Standard Time, UTC+10, so the*DateTimecolumns thatwqp.get_results()andwaterdata.get_samples()append, andutils.format_datetime(), placed a time stampedGSTsix hours off (10:00 local became 06:00 UTC instead of 00:00 UTC).Changes:
GSTmoves to the+1000row.HDT(Hawaii-Aleutian Daylight Time, UTC-9), which is in the USGS list, is added to the-0900row; it used to becomeNaT.Test_attach_datetime_columnscovers both codes; it fails on main and passes here.The other abbreviations that differ between the USGS list and the table (
EAST,CCT,NFT,WAT,NZDT,SST, and others) are unchanged.Checks run locally:
pytest tests/passes (one test inconfiguration_test.pyfails here only because geopandas isn't installed in my environment, and fails the same way on main);ruff checkandruff format --checkpass on the changed files.