[tz] posix timestamp compatibility library for systems using right timestamp

Marek Behun kabel at blackhole.sk
Wed Feb 12 01:36:00 UTC 2014


I have written a small POSIX timestamp compatibility library for
glibc/linux systems which use right timestamp on system clock (and also
a 'right/' timezone).

By executing a program with LD_PRELOAD=/path/to/time2posix.so
environment variable the program can still use a 'posix/' timezone and
display system time correctly (system calls for getting/setting
system time are patched byt time2posix.so).

I wrote this library primarily for synchronizing time from
NTP servers that use UTC. This way, when using for example ntpdate
to synchronize from such a server, ntpdate doesn't have to be patched
to synchronize to right timestamp (instead of posix).

The library could also be used on programs that cannot use 'right/'
timezone (for example PostgreSQL can't handle leap seconds and
therefore won't accept a 'right/' timezone in configuration). For that
though more system call patches need to be implemented.

The sources can be found at https://github.com/elkablo/time2posix

I would like to know if I should continue developing this library or if
there are other ways of synchronizing to right timestamp correctly, or
if right timestamp and consequently right timezones aren't used at all.

Marek Behun
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20140212/68699074/attachment.sig>

More information about the tz mailing list