[tz] Direct implementation of mktime_z

Paul Eggert eggert at cs.ucla.edu
Sat Sep 24 07:14:25 UTC 2022

On 9/23/22 22:29, Ted Phelps via tz wrote:

> One important trick I've used is to embed a year/month/day/hour/minute 
> value in a 64 bit integer for each leap second.  That would work out to 
> 8 x TZ_MAX_LEAPS = 400 extra bytes in struct state.  Is that likely to 
> be a problem?

I wouldn't think so, as it's already 25 KiB.

> I see that 
> there's already an int_fast64_t type in localtime.c so I guess 64-bit 
> math is acceptable?

Yes, though it's really >=64-bit math, since int_fast64_t might have 
more than 64 bits.

More information about the tz mailing list