[tz] Looking for details on timezones “right/…”
Jens Tröger
jens.troeger at light-speed.de
Sun Jan 29 04:11:34 UTC 2023
Thank you, Robert, for the explanation!
I asked because I was using Hypothesis to generate test data for a function I had written, and some of the generated test data contained the prefixes:
https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.timezone_keys
In one particular instance some function runs failed with these prefixed timezones, and it turned out that the host which ran the tests did not have these timezones installed. That’s how I stumbled upon these prefixes… and then wasn’t able to find them documented.
So, I appreciate your sharing some information, thank you!
This raises an interesting point, though: suppose I receive a “genuine UTC” timestamp (i.e. produced on a machine with right/UTC timezone) and then I read that timestamp on a POSIX machine (i.e. with posix/UTC or just UTC timezone) — there is a slim chance that my timestamp has now shifted by one second, correct? And could that be exploited 🤔
With many greetings,
Jens
PS: Is there a public link available to this email thread?
> On Jan 18, 2023, at 04:57, Robert Elz <kre at munnari.OZ.AU> wrote:
>
> Date: Sun, 15 Jan 2023 18:40:27 +0100
> From: =?utf-8?Q?Jens_Tr=C3=B6ger?= via tz <tz at iana.org>
> Message-ID: <2FB37B4F-3F85-4260-8C49-D770591075C6 at light-speed.de>
>
> | Today I stumbled upon timezone strings like “right/UTC”,
>
> Many systems don't bother installing those, as they're not usually
> very useful on POSIX systems.
>
> | I’m unable to find details on the meaning & classification of the
> | “right/” here and how it relates to actual UTC and other timezones.
>
> The right/* zones convert genuine UTC (that is, the time that occasionally
> steps 23:59:58 23:59:59 23:59:60 00:00:00 00:00:01) with leap seconds
> counted.
>
> That's not what you get in a posix time_t - there all days are 86400
> seconds long, no matter what, so a year is always (365 or 366) * 86400
> seconds.
>
> Only if you get (from somewhere) timestamps that are genuinely in UTC
> and not the POSIX approximation of it you get from gettimeofday() or
> clock_*() or stat(), ... are the right/* zones useful for anything at
> all. Unless you're an astronomer, or rocket engineer, the chances
> of that aren't high.
>
> kre
--
Jens Tröger
https://savage.light-speed.de/
More information about the tz
mailing list