Time zone confusion and implementation hints
Tony Finch
dot at dotat.at
Mon Jul 5 16:26:54 UTC 2010
On Mon, 5 Jul 2010, Yves Goergen wrote:
> On 05.07.2010 15:43 CE(S)T, Tony Finch wrote:
> > You can fit a table entry into four bytes, so for two transitions each
> > year between 1970 and 2038 (136 entries) you need just over half a
> > kilobyte.
>
> That's the transition dates. Still need the offsets.
The offsets and other info can be (and are) stored in a separate table
referred to by the main table entries. The tz code uses 5 bytes per entry
but this could easily be reduced to 4 by one-minute time resolution
instead of one-second resolution.
> And it's only until 2038...
Because time_t is still usually signed 32 bits. (I don't know how the tz
code deals with 64 bit time_t.)
Tony.
--
f.anthony.n.finch <dot at dotat.at> http://dotat.at/
FORTIES CROMARTY FORTH TYNE DOGGER: WEST OR SOUTHWEST 4 OR 5, INCREASING 6 FOR
A TIME. SLIGHT OR MODERATE, OCCASIONALLY ROUGH AT FIRST IN FORTIES. SHOWERS.
GOOD.
More information about the tz
mailing list