Re: localtime()

Laurent Bercot <[email protected]> Mon, 5 Dec 2011 00:45:51 +0100
Newsgroups gmane.linux.lib.dietlibc
Message-ID <[email protected]>
> Nope, I'm only an amateur who happens to enjoy making a few small programs for
> home use that are immune to software upgrades that can go wrong, I'm not in the
> same league as you guys. Anyway, I was not sure what is the officially expected
> behavior, the linux man page is not that clear. Subtracting 24s (each second,
> in a "wall-clock" program) is not ideal but it does the job.

 Correct time handling under Unix is a mess.
 A comprehensive guide to understand the problem and its solutions can be
found here:

  http://www.madore.org/~david/computers/unix-leap-seconds.html

 POSIX more or less requires people to set their system clocks to UTC:
so a Berliner complying with POSIX would set his clock to UTC and his
timezone to Europe/Berlin to get the correct local time.
 But this setting breaks in several subtle ways, so a few people,
including DJB, Arthur David Olson (author of the right/ timezones) and
me, recommend disagreeing with POSIX and setting system clocks to TAI-10
and using right/ timezones to get the local time - so a Berliner setting
his system clock to TAI-10 should have a timezone containing
right/Europe/Berlin.

 What is this thing about German law ? Does German law require a specific
system clock setting ? If it requires using the right/ timezones, that
means the system clock should be set to TAI-10, not UTC.

-- 
 Laurent