Files
AvianVisitors/scripts
cdkl 0448eb8134 Remote utc to localtime conversion from daily_plot.py
Introduction of yesterday/today handling added a bug that expresses itself on systems whose timezones are behind UTC. Specifically, the 'localtime' modifier to DATE() attempts to interpret the date to the left as UTC, and convert to localtime. The result is that in timezones behind UTC, the date selected is always 1 earlier than intended.

No timezone conversion should be done. The db data is in local time already.

Here's a demonstration of calling DATE() in various ways in North America EST:

sqlite> select DATE('now');
2024-02-26
sqlite> select DATETIME('now');
2024-02-26 17:20:46
sqlite> select DATE('2024-02-26');
2024-02-26
sqlite> select DATETIME('2024-02-26');
2024-02-26 00:00:00
sqlite> select DATE('now', 'localtime');
2024-02-26
sqlite> select DATE('2024-02-26', 'localtime');
2024-02-25   <--- this is the bug
2024-02-26 12:25:10 -05:00
..
2022-02-18 12:47:17 -05:00
2022-02-18 12:47:17 -05:00
2022-02-18 12:47:17 -05:00
2024-02-16 09:57:23 +01:00
2024-02-13 10:57:35 +01:00
2024-02-13 10:57:35 +01:00
2024-02-13 10:57:35 +01:00
2023-02-10 14:40:39 -05:00
2023-05-06 15:28:02 -04:00
2022-06-02 08:24:29 -04:00
2023-04-07 13:05:18 -04:00
2023-05-22 23:55:11 +10:00
2024-02-24 11:38:25 +01:00
2023-06-12 15:44:27 -04:00
2024-02-13 10:57:35 +01:00
2022-05-11 17:21:58 -04:00
fix
2023-06-04 19:04:41 -04:00
2023-05-22 23:55:11 +10:00
2024-02-13 10:57:35 +01:00
2022-06-29 09:01:51 -04:00
2023-03-04 16:37:58 -05:00