openmeteo / enhydris

A database with a web interface for the storage and management of hydro/meteorological measurements and time series
GNU Affero General Public License v3.0
18 stars 11 forks source link

Fix UTC timezone issue in Meteoview2 #511

Closed Shrhawk closed 1 year ago

Shrhawk commented 1 year ago

Checklist:

Shrhawk commented 1 year ago

@aptiko ping, also check the messages

aptiko commented 1 year ago

This is not the right way to fix it. The unit tests were actually correct, because the telemetry.data_timezone is set by the tests to Europe/Athens, meaning it should be converted from that one to UTC, and the station.display_timezone is set to Etc/GMT-2, which is the same thing for winter, so when retrieved and printed, you get the same result as the value received from the logger.

I think that the main code is also correct and that #503 is invalid and everything works as it's supposed to work, so I'm going to go ahead and close both this and #503. If I'm wrong and there is a problem after all, we'll certainly discover it.