⬆️ ⬇️

Change time zones in Mac OS X Snow Leopard

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




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.





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 ).

Source: https://habr.com/ru/post/131621/



All Articles