Guide for setting up TIMEZONE settings in IRIX 6.*
This page describes how I set up TIMEZONE settings in London, UK, to provide automatically, local time for use by IRIX 6.5 on my Silicon Graphics 'Indy'.
The `default' method:
One way to maintain `TIMEZONE' data in IRIX (for people in the UK, for example) is to edit the file `/etc/TIMEZONE' and enter `TZ=GMT0BST,M3.5.0/1,M10.5.0/2', meaning: jump the clock forward one hour at 01:00 am GMT on the Sunday of the last week of the third month and jump the clock back one hour at 01:00 GMT on the Sunday of the last week of the tenth month. (Note that the TZ environment variable is expressed in local time, so 01:00 GMT is set above as 02:00 BST). `/etc/TIMEZONE' is read by `init' on startup and processes inherit this. However, `TIMEZONE', as implemented in this way in IRIX, does not take into account leap seconds, nor changes made by the European Union and other bodies, in daylight savings time. The TIMEZONE settings have to be altered manually every year, to update them, as changeovers are often variable.
The `recommended' method:
The `best' method, is to install Arthur Olson's `tzone' TZ extensions, which are in public-domain files at ftp://elsie.nci.nih.gov/pub/ The `code' for the programs that are used to compile TIMEZONE `data' files, is in a file called `tzcodeV.tar.gz', where `V' is the code's version. The `data' is in a file called `tzdataV.tar.gz', where `V' is the code's version. The `data' files contain information about local time for many cities and countries around the world. They are updated periodically to reflect changes made by political bodies to UTC offsets and daylight-saving rules. This collection of data, called `zoneinfo', can be used by many operating systems, including BSD, DJGPP, GNU/Linux, IRIX, Solaris, and Unixware, to provide local time automatically. Using this approach, leap years, leap seconds etc., are taken care of automatically well into the 21st. C. James Pearson firstname.lastname@example.org has written that "As of IRIX 6.5.3f SGI "officially" supports the ZIC format [..which..] IRIX has been able use .. for a number of years. However, [..] the ZIC files supplied by SGI are not up to date. Also I have found an obscure bug in the ZIC usage where the DST hour can be added (subtracted) twice - which should be fixed in 6.5.5f".
How to setup and use Arthur Olson's `tzone' TZ extensions:
Most of the work has been done already, as Peter Ilieve has compiled the `code' programs called `zic' and `zdump' and he has used them to compile the many current `data' files (the `zoneinfo' database) into usable files for people running IRIX 6.*. He has provided the compiled programs for IRIX 6.*, the databases and the `man' pages for `zic' and `zdump' at ftp://ftp.memex.co.uk/pub/sgi/tz.tardist
1. Download ftp://ftp.memex.co.uk/pub/sgi/tz.tardist to /tmp/ on your computer running IRIX 6.*. Open a shell, become superuser and type 'swmgr'. This will open Software Manager. Type /tmp/tz.tardist into the box and click Customize installation. This will find the 'new' program Arthur Olson timezone package, version 1999g. It includes the 'base software', 'data files', 'unformatted man pages' and 'release notes'. Start the installation and exit when it has completed. You can save the installation file or delete it. Quit Software Manager.
2. Edit the `/etc/TIMEZONE' file to add your location. First, make a copy of it called /etc/TIMEZONE.def. Edit /etc/TIMEZONE and disable any current lines in it by entering the `#' symbol at the start of each line. Then add the following two lines, if you live in London, UK, for example.
and save the file. If you live elsewhere, point `TZ' to the relevant file for your `Area/City', which you will find in an equivalent directory under `/usr/lib/locale/TZ'.
3. Check to see if there are other files that have TIMEZONE settings in them:
(a) a file called '~/.timezone' which has a line with 'GMT0BST' or similar: delete the file.
(b) two files called '~/.desktop-<hostname>/desktopenv' and
'~/.desktop-<hostname>/.userenv' which have lines with 'TZ' settings: 'hash' these lines out.
4. Restart the computer to active the TIMEZONE settings, which are used by IRIX in many places.
5. You do not need to do this, but you can check that TIMEZONE has the correct settings for your zone:
(a) Execute in a shell (this is for London, UK):
/usr/local/bin/zdump v c 2001 Europe/London | grep 2000
and see that the last four lines contains the 2000 data:
Europe/London Sun Mar 26 00:59:59 2000 UTC = Sun Mar 26 00:59:59 2000 GMT isdst=0
Europe/London Sun Mar 26 01:00:00 2000 UTC = Sun Mar 26 02:00:00 2000 BST isdst=1
Europe/London Sun Oct 29 00:59:59 2000 UTC = Sun Oct 29 01:59:59 2000 BST isdst=1
Europe/London Sun Oct 29 01:00:00 2000 UTC = Sun Oct 29 01:00:00 2000 GMT isdst=0
This showed that the local times in London would change forward from GMT to BST at 01:00 on 26 March 2000 and back again to GMT at 01:00 on 29 October 2000, which is correct.
(b) Execute, in a shell
par -sSSl date
and look at the output to see if it can open and read from /usr/lib/locale/TZ/Europe/London, or the file you entered for TZ, if it was not London.
You can run 'man zic' (the timezone compiler) and 'man zdump' (the timezone dumper) to see the uses for these two programs. These programs were installed in /usr/local/bin and their man pages were installed in /usr/local/man/cat8.
With thanks to Paul Eggert for the links
- WORLDTIME: interactive atlas, time info, public holidays contains information on local time, sunrise and sunset, and public holidays in several hundred cities around the world.
- World Time Zones contains US Naval Observatory data, used as the source for the usno* files.
- The US Central Intelligence agency publishes a static Standard Time Zones of the World map in multiple resolutions. including 75 kB, 1 MB, and 3 MB versions. The pictorial quality is good, but the map does not indicate summer time, and parts of the data are a few years out of date.
- The Time of Internet contains good descriptions of Time Zones and daylight saving time, with diagrams. The time zone map is out of date, however.
- Daylight Saving Time -- Saving Time, Saving Energy is a history of DST in the US.
- Yahoo- Science:Measurements_and_Units:Current_Time
- The International Air Transport Association publishes the IATA SSIM, which gives current time zone rules for all the airports served by commercial aviation.
- Bulletins of IERS contains official publications of the International Earth Rotation Service, the committee that decides when leap seconds occur.
- Microsoft's article 'Time Stamp Changes with Daylight Savings' on why the file 'times' shown in Windows 95/98 can be incorrect : "..The time returned by the file system (in Windows95) is not adjusted for Daylight Savings Time. This feature is by design, and was implemented to work with servers such as NetWare that do not support the Daylight Savings time APIs and time functions in Windows 95. In this case the files will display off by one hour..."
- Understanding Time Zones at Wakanow.com
Return to the 'home page'
Return to the `Computing index page'