You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should instead store DateTime<FixedOffset> by converting them to RFC3339 format which is a variant of ISO8601 and SQLITE compatible format (using to_rfc3339_opts) and has time offset information in it.
Similarly we should try to utilize this offset in potentially in the text value in the Decode implementation of DateTime<FixedOffset> by first attemting to use DateTime::parse_from_rfc3339.
The text was updated successfully, but these errors were encountered:
05storm26
changed the title
chrono::DateTime<FixedOffset> doesn't store the offset (timezone) is sqlite as text and timezone information is lostchrono::DateTime<FixedOffset> doesn't store the offset (timezone) in sqlite as text and timezone information is lost
Jan 10, 2022
Currently a
chrono::DateTime<FixedOffset>
in theEncode
trait forsqlite
is converted to UTC and stored without an offset.This causes the timezone/offset information to be lost. SQLite supports timezones in its formats: https://www.sqlite.org/lang_datefunc.html#time_values
We should instead store
DateTime<FixedOffset>
by converting them to RFC3339 format which is a variant of ISO8601 and SQLITE compatible format (usingto_rfc3339_opts
) and has time offset information in it.Similarly we should try to utilize this offset in potentially in the text value in the
Decode
implementation ofDateTime<FixedOffset>
by first attemting to useDateTime::parse_from_rfc3339
.The text was updated successfully, but these errors were encountered: