Skip to content

fix(codes): read GST as Guam Standard Time, as the services do - #455

Merged
thodson-usgs merged 2 commits into
DOI-USGS:mainfrom
yang00333:fix/guam-time-zone
Oct 16, 2026
Merged

thodson-usgs merged 2 commits into
DOI-USGS:mainfrom
yang00333:fix/guam-time-zone

Conversation

@yang00333

@yang00333 yang00333 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #454

codes.timezones mapped GST to UTC+4 (Gulf Standard Time). The USGS time-zone codes (https://help.waterdata.usgs.gov/tz) 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, and utils.format_datetime(), placed a time stamped GST six hours off (10:00 local became 06:00 UTC instead of 00:00 UTC).

Changes:

  • GST moves to the +1000 row.
  • HDT (Hawaii-Aleutian Daylight Time, UTC-9), which is in the USGS list, is added to the -0900 row; it used to become NaT.
  • The module docstring says that ambiguous abbreviations follow the services' code lists.
  • A parametrized test in Test_attach_datetime_columns covers both codes; it fails on main and passes here.
  • A NEWS.md entry.

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 in configuration_test.py fails here only because geopandas isn't installed in my environment, and fails the same way on main); ruff check and ruff format --check pass on the changed files.

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.
@thodson-usgs
thodson-usgs merged commit 7dea458 into DOI-USGS:main Oct 16, 2026
11 checks passed
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.

GST is read as Gulf Standard Time (UTC+4) instead of Guam Standard Time (UTC+10)

2 participants