quodlibetor on main
Locales and format_localized (#… (compare)
oh yeah sqlite won't do much for you, mostly you'd want to store the timezone as a separate column and then use chrono-tz to back out the actual time
Yeah I might do that. This is just a hobby project for now, so not sure if that's super useful. The main thing is storing the DateTime when things happened, and if I just store a UTC time, I can always convert it to local time after reading it from the database.
technically UTC has leap seconds
It seems if I did something like
date.succ()until I get to the next year
Convert the result of (1) to
DateTime<Local> as year_start and the result of (2) to
next_year_start. I don't think there's any ambiguity there (correct me if I'm wrong), but that ends up with Utc datetimes that are (in my case) 7 hours before midnight on Jan 1 in my timezone.
date.succ()in a loop :)
Noneon a genuinely invalid time, which shouldn't happen when you're parsing something that was constructed by chrono
if letto guard against mistakes crashing your server, but for a hobby thing I think it'd be fine