Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado Apto para principiantes
#454 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@yang00333 ya está trabajando en esto.

Desde el 16/10/2026.

  • #455 de @yang00333 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
78/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
pandas, python
Área
data

Línea de trabajo

Los offsets incorrectos están en la tabla de abreviaturas de dataretrieval/codes/timezones.py, y _build_utc_datetime en dataretrieval/_wqx.py los aplica. Ejecuta la reproducción del issue, que llama a _attach_datetime_columns, para ver que GST cae en +0400. Cambia GST a +1000, NZDT y FJST a +1300, y añade HDT con -0900. Después añade tests al estilo de #432. Está terminado cuando la reproducción imprima 2024-06-01 00:00:00+00:00 y los nuevos casos pasen. Deja las demás abreviaturas ambiguas como están, salvo que un maintainer lo pida.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

codes.timezones puts GST on the +0400 row (Gulf Standard Time):

https://github.com/DOI-USGS/dataretrieval-python/blob/d5254bef635327765418dd590462246d4d1227df/dataretrieval/codes/timezones.py#L19

and _wqx._build_utc_datetime applies that offset when it builds the UTC column:

https://github.com/DOI-USGS/dataretrieval-python/blob/d5254bef635327765418dd590462246d4d1227df/dataretrieval/_wqx.py#L37

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. The same table feeds the *DateTime columns that wqp.get_results() and waterdata.get_samples() append, and utils.format_datetime(), so any result stamped GST is placed six hours off. (I haven't found a live response that carries GST yet; the Guam results I pulled from the Water Quality Portal have no times.)

Reproduce:

import pandas as pd
from dataretrieval._wqx import _attach_datetime_columns

df = pd.DataFrame({
    "Activity_StartDate": ["2024-06-01"],
    "Activity_StartTime": ["10:00:00"],
    "Activity_StartTimeZone": ["GST"],
})
print(_attach_datetime_columns(df)["Activity_StartDateTime"][0])
# 2024-06-01 06:00:00+00:00   expected 2024-06-01 00:00:00+00:00

Comparing the table with the USGS list turned up two smaller problems:

  • NZDT is +1330; the USGS list has UTC+13 (as does FJST, Fiji Summer Time).
  • HDT (Hawaii-Aleutian Daylight Time, UTC-9) is in the USGS list but not in the table, so it becomes NaT.

A few other abbreviations also mean different zones in the two lists (for example EAST, CCT, NFT, WAT, and SST, which the USGS list uses for Swedish Summer Time but WQX uses for Samoa). I have left those alone, since I don't know which ones actually appear in responses.

I have a small fix with tests ready for GST, NZDT/FJST, and HDT, following the pattern of #432. Happy to open a PR if that's welcome.

Python 3.11, pandas 3.0.2, dataretrieval main (d5254bef).

Lenguaje dominante
Python
Estrellas
269
Forks
67
Merge medio
3 d 17 h
PR fusionados (30 d)
18

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de DOI-USGS/dataretrieval-python

Todos los issues de DOI-USGS/dataretrieval-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.