todoman
todoman copied to clipboard
Revise how timestamps are stored in DB
- Apparently sqlite has a timestamp type: https://stackoverflow.com/questions/1829872/how-to-read-datetime-back-from-sqlite-as-a-datetime-instead-of-string-in-python
- @swati4star showed that datetimes are automatically converted into timestamps when passed as query param
FWIW: Testing this sort of thing (and also, making sure timezones are taking into consideration) is no fun. I recall having some issues with either PARSE_DECLTYPES
or PARSE_COLNAMES
, but didn't write anything down, regrettably (also, we had TZ issues elsewhere at the time, so might results might have been off).