Introduction
In connection with the cancellation of the transition to summer / winter time is dedicated.
On Mac OS X, time zone settings are in two places: / etc / localtime and /usr/share/icu/icudtXXX.dat.
/ etc / localtime, which is a symbolic link to / usr / share / zoneinfo / [set by the time zone, for example Europe / Moscow], sets the time zone settings for the console.
System clocks, Mail applications and others take time zone settings from /usr/share/icu/icudtXXX.dat.
October 30, 2011 I have the following: in Terminal and various console utilities, the time is correct (localtime has been updated in advance), and in Mail, the system clock and so on is an hour behind.
')
Solution to the problem
Modifying / etc / localtime
- Download the current version of tzdata (I used tzdata2011l.tar.gz, the latest version can be found here ).
- Unpacking ( tar xzf ./tzdata2011l.tar.gz ).
- Apply ( sudo zic europe ).
- Checking ( zdump -v / etc / localtime | grep 2011 ).
It should look like this:
eth0-loth:~$ zdump -v /etc/localtime | grep 2011
/etc/localtime Sat Mar 26 22:59:59 2011 UTC = Sun Mar 27 01:59:59 2011 MSK isdst=0
/etc/localtime Sat Mar 26 23:00:00 2011 UTC = Sun Mar 27 03:00:00 2011 MSK isdst=0
As you can see, the March transition is indicated, and the October one has disappeared.
Modification /usr/share/icu/icudtXXX.dat
I have Xcode, so I compiled the file directly from myself.
- Download the source code ICU (take here ).
- Unpack:
tar xzf ICU-400.42.tar.gz
cd ICU-400.42 / icuSources - Copy the current tzdata to the source:
cp ~ / tzdata2011l.tar.gz ./tools/tzcode/ - We compile and compile:
./runConfigureICU MacOSX --with-data-packaging = archive
gmake - Make a backup:
cp /usr/share/icu/icudt40l.dat ~ - Install the file:
sudo install -o root -g wheel -m 0644 -Sp data / out / icudt40l.dat /usr/share/icu/icudt40l.dat - For final use, reboot.
Conclusion
All the above was checked on Mac OS X Snow Leopard 10.6.8. As a result, we have the correct time zone (Europe / Moscow), included ntp synchronization and the correct time in all applications.
PS It is worth noting that when trying to build a later version of icu (icudt46l), the system was unstable.
PPS Thanks
gag_fenix for an invite!
UPD: Compiled icudt40l.dat file (
here ) and Moscow zone file (
here ).