Looking for non-TZ-dependent localtime()

Paul Eggert eggert at CS.UCLA.EDU
Wed Aug 4 06:18:40 UTC 2004

Michael Lindner <mlindner at idttechnology.com> writes:

> Is there a localtime()-like implementation out there that can do what
> I need, or do I have to write one?

I think the latter, unless you want to use Java

Jonathan Lennox proposed a C API in
I vaguely recall that something got implemented; perhaps
you can consult the archive of the tz mailing list.

> And if not and I have to write one,
> what code base is the "correct" one to start from (e.g. Linux,
> tzcode2003e.tar.gz from elsi.nci.nih.gov, etc.)?

GNU/Linux (i.e., glibc) and tzcode are both reasonable.  Neither is
bug-free.  GNU/Linux currently has some problems with negative time
stamps; tzcode with large 64-bit time_t values -- choose your poison.
GNU/Linux is LPGLed and is probably more widely used; tzcode is public

More information about the tz mailing list