this post was submitted on 22 Jul 2024
98 points (98.0% liked)
Rust
5935 readers
4 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Yes, although at present, there is a TTL. So an update may take "time" to propagate.
jiff::tz::db().reset()
will force the cache to be invalidated. I expect the cache invalidation logic to get tweaked as we get real experience with it.It's hard to know precisely what you mean. But once you get a
jiff::tz::TimeZone
, that value is immutable: https://docs.rs/jiff/latest/jiff/tz/struct.TimeZone.html#a-timezone-is-immutableNew updates to tzdb are only observed when you do a tzdb lookup.
That's kinda my point. How do they do that? And does it work with
chrono-tz
andtzfile
? And what happens if tzdb updates lead to a serialized datetime with an incorrect offset in a future update of tzdb? There are all sorts of points of failure here that Jiff will handle for you by virtue of tighter integration with tzdb as a first class concept.