Change time zones in Mac OS X Snow Leopard
In connection with the cancellation of the transition to summer / winter time, it is dedicated.
On Mac OS X, the 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 time zone, for example Europe / Moscow], sets the time zone settings for the console.
System clocks, Mail applications and others take timezone settings from /usr/share/icu/icudtXXX.dat.
October 30, 2011 I had the following: in Terminal and various console utilities, the time is correct (localtime was previously updated), and in Mail, the system clock, and so on, it is an hour behind.
Modification / etc / localtime
- Download the current version of tzdata (I used tzdata2011l.tar.gz, the latest version can be taken here ).
- Unpack ( tar xzf ./tzdata2011l.tar.gz ).
- Apply ( sudo zic europe ).
- Check ( zdump -v / etc / localtime | grep 2011 ).
It should turn out something like this: As you can see, the transition in March is indicated, and the October one has disappeared.
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
I have Xcode installed, so I compiled the file right in my place.
- Download the source ICU (take here ).
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/
- Build and compile:
./runConfigureICU MacOSX --with-data-packaging = archive
- 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 the final application, reboot.
All of the above was tested on Mac OS X Snow Leopard 10.6.8. As a result, we have the correct time zone (Europe / Moscow), ntp synchronization enabled, 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 worked unstably.
PPS Thank you gag_fenix for invite!
UPD: Compiled icudt40l.dat file ( here ) and Moscow zone file ( here ).