[OpenIndiana-discuss] How to configure OI for proper daylight savings adjustments.

Jim Klimov jimklimov at cos.ru
Mon Apr 1 09:55:10 UTC 2013


On 2013-03-31 19:47, Robin Axelsson wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
> my server has been quite troublesome when it comes to adjusting the time
> for daylight savings. Last time it adjusted the system time by moving it
> forward by no less than two hours and now it is one hour behind. It
> never gets it right. The config file "/etc/default/init" has a
> "TZ=Europe/Stockholm" line in it, and there is a
> "/usr/share/lib/zoneinfo/Europe/Stockholm" file in existence.
>
> I've had problems with the scheduled DST adjustments since the good old
> OpenSolaris days and it is a true pita. Is there anyone who has got this
> working properly?

I am of the school that says "There is only one timezone, and it
is UTC". And don't mistake it with GMT, which some say to be equal
to UTC and others say it is UTC+dDST... half a year both statements
are true ;)

Configure your server's hardware clocks, OS clock via /etc/rtc_config,
maybe logfile clocks (as inherited from server processes' clocks) to
be in UTC, and only leave the local timezone as as interface feature,
preferably even just per-session like any other locale data, or at
most via a common /etc/TIMEZONE file.

# cat /etc/rtc_config
zone_info=UTC
zone_lag=0

# cat /etc/TIMEZONE
TZ=Europe/Moscow
CMASK=022

This way your log files don't get entries with skipped or repeated
hours, your scripts which might depend on "$now - $last_timestamp"
won't go crazy twice a year, etc. Processing is done in monotonously
increasing linear time, just as classic physics defined it ;)

HTH,
//Jim Klimov



More information about the OpenIndiana-discuss mailing list