[tz] So, about those LMT offsets

Paul Eggert eggert at cs.ucla.edu
Mon May 24 02:59:13 UTC 2021


On 5/23/21 2:43 PM, Clive D.W. Feather via tz wrote:

> there
> should be a way to put a "not valid before" marker into the zone data and
> have the functions return either an error or a clearly nonsense answer.

RFC 8536 section 5.1 says that client code can use the first transition 
time as a "not valid before" marker - that is, client code can return an 
error before the first transition.

However, it's common for clients to assume that all timestamps can be 
converted - something that is true on older or smaller POSIX hosts with 
32-bit time_t and 32-bit int - and so tzcode (and all POSIXish client 
code that I know about) does convert timestamps before the first 
transition. And when doing that conversion, using the LMT offset 
typically yields a more-accurate answer for the affected area than using 
a 0 offset would. I doubt whether we could change this behavior in 
client code now, without causing more trouble than it'd cure.


More information about the tz mailing list