Conversely, in Jiff, all time zone lookups by name are cached.
Is the cache invalidated if system tzdata is updated?
And what effect does the answer have on the example from “Jiff supports detecting time zone offset conflicts” if both zoned datetimes used the system timezone which got updated between 1. opening 2. parsing the two zoned datetimes.
Jiff losslessly roundtrips time zone aware datetimes
In this section, wouldn’t be more realistic for chrono users to use timezone info around the wire instead of on the wire, rather than using Local+FixedOffset?
In this section, wouldn’t be more realistic for chrono users to use timezone info around the wire instead of on the wire, rather than using Local+FixedOffset?
They do say that the difference is that chrono users would need to keep out-of-band timezone information in addition to the datetime, whereas Jiff does it in-band.
That’s fine. I didn’t look at the code, but from what I gather, Jiff serializes the timezone name (not detailed tz info). chrono users would communicate the same thing, but it’s not built-in functionality in the dt type itself.
The example I referred to however may imply that chrono users would be inclined do the wrong thing, and get the wrong result as a sequence.
(humble personal opinion bit) It feels like it’s a case where the example was pushed a bit extra to fit into the “jump into the pit of success/despair” reference. A reference many, young and old, wouldn’t recognize, or otherwise wouldn’t care for anyway.
You should look at it, they say the implement RFC 9556 timestamps, which include tz info. In my experience it IS useful in real use, because a fixed offset timestamp can lose a bit of information.
For example, if you have a timestamp and want to add a few months to it, for example for a reminder, you will get a timestamp at the same time in the same offset. In many cases that will be wrong, because of things like daylight savings time, which change the offset of the timezone. You will get a timestamp an hour before or after the moment you intended, and it will be in the “wrong” offset in that timezone in that time of year. With timezone aware timestamps, they are aware that the offset will change, and will be able to give a timestamp in the future at the correct time and offset.
From
COMPARE.md:Is the cache invalidated if system tzdata is updated?
And what effect does the answer have on the example from “Jiff supports detecting time zone offset conflicts” if both zoned datetimes used the system timezone which got updated between 1. opening 2. parsing the two zoned datetimes.
In this section, wouldn’t be more realistic for
chronousers to use timezone info around the wire instead of on the wire, rather than usingLocal+FixedOffset?They do say that the difference is that
chronousers would need to keep out-of-band timezone information in addition to the datetime, whereasJiffdoes it in-band.That’s fine. I didn’t look at the code, but from what I gather,
Jiffserializes the timezone name (not detailed tz info).chronousers would communicate the same thing, but it’s not built-in functionality in the dt type itself.The example I referred to however may imply that
chronousers would be inclined do the wrong thing, and get the wrong result as a sequence.(humble personal opinion bit) It feels like it’s a case where the example was pushed a bit extra to fit into the “jump into the pit of success/despair” reference. A reference many, young and old, wouldn’t recognize, or otherwise wouldn’t care for anyway.
You should look at it, they say the implement RFC 9556 timestamps, which include tz info. In my experience it IS useful in real use, because a fixed offset timestamp can lose a bit of information.
For example, if you have a timestamp and want to add a few months to it, for example for a reminder, you will get a timestamp at the same time in the same offset. In many cases that will be wrong, because of things like daylight savings time, which change the offset of the timezone. You will get a timestamp an hour before or after the moment you intended, and it will be in the “wrong” offset in that timezone in that time of year. With timezone aware timestamps, they are aware that the offset will change, and will be able to give a timestamp in the future at the correct time and offset.