Koozali.org: home of the SME Server

DST timezone update

StevenBrady

DST timezone update
« on: February 28, 2007, 11:29:39 PM »
I still maintain several SME 6.0 servers that will not be upgraded to 7, at least currently.  As an easy way to update the timezone data for MST, I made the following script that I just run on all of my servers.  You, of course, would change "northamerica" for which you would need, listed below.  It appears the valid options are africa, antarctica, asia, australasia, europe, northamerica
southamerica, pacificnew, solar87, solar88, and solar89.  Unfortunately, I'm not that versed on timezones, so I can't be of any help beyond what I see that has unarchived.

It downloads the data, lists the 2007 data for /etc/localtime, updates the data, then lists the updated data.  When it's all said and done, you'll be good to get rid of the timezone directory it creates.

-Steve

Quote
#!/bin/bash
mkdir timezone
cd timezone
echo Downloading timezone data ...
wget http://public.www.planetmirror.com/pub/timezone/tzcode2007c.tar.gz
echo
echo Extracting timezone data ...
tar -xzvf tzdata2007c.tar.gz
echo
echo Displaying old timezone data for 2007 ...
zdump -v /etc/localtime | grep 2007
echo
echo Updating timezone data ...
zic northamerica
echo
echo Displaying new timezone data for 2007 ...
zdump -v /etc/localtime | grep 2007