msk timezone

this script will test your clock for new timezone:

 

#!/bin/sh -ef
S1=$(LC_ALL=C TZ=Europe/Moscow date -d @1314567890)
[ "$S1" = 'Mon Aug 29 01:44:50 MSK 2011' ] || (echo FAIL1; exit 1)
S2=$(LC_ALL=C TZ=Europe/Moscow date -d @1324567890)
[ "$S2" = 'Thu Dec 22 19:31:30 MSK 2011' ] || (echo FAIL2; exit 2)
echo OK

 

if you will recieve as result FAIL1 of FAIL2, you must check version (it should be more then «h», i.e. 2011i, 2011j, etc ) of your timezone tool:

tzdata for redhat-based os

timezone for suse

timezone-data for gentoo/funtoo