SunOS 5.6: timezone data patch

Does anyone know if there is a patch for SunOS 5.6 timezone update for new daylight savings times. I have looked and have updated my 5.8 machine. Can not find one for 5.6. I still use one box for a certian piece of hardware that can not use the newer versions.

Most of the following found at sunsolve.sun.com:

Refer to the `zic`, `ctime`, `TIMEZONE`, `environ(5)` man pages for more help.

The world's central repository for zoneinfo source files can be found via anon ftp from ftp://elsie.nci.nih.gov/pub.
The "tzdataYYYYr.tar.gz" file in this directory (YYYY is the year and r a release letter) contains sources. A quick check shows the latest to be tzdata2007b.tar.gz

Note that this is "unofficial"; there are few "official" sources for this information worldwide and national governments routinely change the rules for a variety of reasons, practical, ecological or even political, without informing anyone beforehand. The zoneinfo sources on elsie are kept updated mainly through the efforts of the IT community.

Check timezone issue with
zdump -v US/Eastern|grep 2007

(You can change Eastern to what ever timezone you want)

Following script by Greg D.

#!/bin/sh -x

TZDATATAR=$1

# Change dir to standard location of timezone rule files
# for Solaris 7 and earlier and un-tar
cd /usr/share/lib/zoneinfo || exit 1
/usr/bin/tar xf $TZDATATAR || exit 1

# use zic to compile all src files with a "Rule"
for i in `/usr/bin/grep -l Rule *` ; do
  /usr/sbin/zic $i
done

# use zic to compile 2 src files which define a Zone but no Rule
/usr/sbin/zic etcetera
/usr/sbin/zic factory

# use zic to link legacy TZ names to new TZ standard names
/usr/sbin/zic backward

# change ownership to be in line with expected Solaris values.
/usr/bin/chown -R bin:bin * 

Copy the tar file and this script into /tmp - su to root.
Execute /tmp/tzinstall /tmp/tzdata2007b.tar

Verify with zdump command that you are now good (should see Mar 11 versus the April date).

Unfortunately there isn't a POSIX patch though unless you pay SUN for researching and programming.

We're going to copy our Solaris 8 timezone directories to the Solaris 2.6 and 7 servers.

Carl

BOFH, have you done the copy already and if so, what were the results? (good point about the POSIX )

I haven't done it. The servers belong to another admin and he has it scheduled for next weekend (we can only apply patches every other weekend). If it works, great, otherwise he'll be in the following weekend to manually change times :slight_smile:

Carl

Please see [thread=35535]Understanding Unix Timekeeping[/thread] where I explain why I think that's not a great idea and what I would do instead.

Good article. Several good bits there (I'll be checking out cron's source code for one bit :slight_smile: ).

While I suggested simply editing the zone files and recreating them for the right times, an easy enough task, management declined and wanted to just manually change the time. I think we convinced them to at least attempt to use the zone files from a patched Solaris 8 system which is what's happening next weekend. The fallback, if the patch fails is to manually change the time. I don't expect the transfer to fail though.

I will try out the TZ bit you used for /etc/TIMEZONE on my home Solaris 7 box. Thanks.

Carl