NOAA-OWP / wres

Code and scripts for the Water Resources Evaluation Service
Other
2 stars 1 forks source link

As a James, I want to communicate an ongoing smell with our handling of timestamps w/r to the wres db #259

Open epag opened 3 weeks ago

epag commented 3 weeks ago

Author Name: James (James) Original Redmine Issue: 91563, https://vlab.noaa.gov/redmine/issues/91563 Original Date: 2021-05-04


Given an evaluation that ingests time-series into the wres db (and retrieves timeseries from it) When the timestamps are both ingested and retrieved Then they should be in UTC, not in local times (regardless of the database or database settings or machine settings)

( So that I don't get incorrect evaluation statistics whereby daylight savings have been applied. )

epag commented 3 weeks ago

Original Redmine Comment Author Name: James (James) Original Date: 2021-05-04T11:04:08Z


See around #60801-386 through #60801-391. The correctness of a wres evaluation should not depend on my setting the timezone in which the database server is operating.

Not sure exactly where the smell is coming from - needs more digging. It should be possible to follow the implicit rule of timestamps in utc, but it might help to be explicit by setting the timestamps to utc and then also setting the client to utc.

Perhaps the smell is that the client app applies different handling on ingest and retrieval. Anyway, tbd, the smell is there.

epag commented 3 weeks ago

Original Redmine Comment Author Name: James (James) Original Date: 2021-05-04T11:06:21Z


( Wording of the op is also tentative and could change depending on where the smell originates. )

epag commented 3 weeks ago

Original Redmine Comment Author Name: James (James) Original Date: 2021-05-04T11:16:32Z


( Probably also worth noting that UTC and a zoned time and an offset time are all different things. UTC is a time standard, an offset time is a time offset from a standard (UTC) and a time zone is a geographic region that has some time rules, which may lead to a non-constant offset from a standard (UTC), such as when daylight saving time applies. )