This complete implementation of NSTimeZone uses the time zone data at
<ftp://elsie.nci.nih.gov/pub/>.

Structure of time zone directory:

NSTimeZones/
	abbreviations - Abbreviation map file
	regions - Regions grouped by latitude
	zones/ - Saves the files with the time zones

Install the 'NSTimeZones/' directory in GNUSTEP_INSTALL_LIBDIR
(e.g. if you configured the library with "./configure
--prefix=/usr/local", then install it in '/usr/local/lib/gnustep/').

The file in 'zones/' was created from 'tzcode2007c.tar.gz' and
'tzdata2007c.tar.gz' by building and (after minor modification)
installing the software in those tarballs.
The install process places the timezone files in
/usr/local/etc/zoneinfo by default, so they were copied from there to 'zones'.
The files 'localtime', 'posixrules', 'Factory', 'zone.tab' and 'iso3166.tab'
were removed.
Hard links were removed by doing a `cp -R' of the final archive to a
different directory, and then using that directory.  We removed hard
links just because RPM (red hat package manager) seems to have
problems with hard links.

1. The tarballs were unpacked.

mkdir /tmp/tz
cd /tmp/tz
# Fetch tarballs via ftp
tar -xzf tzcode2007c.tar.gz
tar -xzf tzdata2007c.tar.gz

2. The software was built (with tzcode2004j, tzdata2004j, on
GNU/Linux)

make

3. GNUstep timezone information was appended to the file 'etcetera' in order
to provide GMT+/- timezones in OPENSTEP (common usage) format rather than
Posix format (the Posix style timezones are created in the 'Etc' subdirectory).

chmod u+w etcetera
cat $GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones/GNUstep_zones >> etcetera

4. The old information (if any) was removed and the timezone files
were generated and installed (you may need to be logged in as root for
file permissions).

rm -rf /usr/local/etc/zoneinfo
make install

5. The timezone information was copied into the GNUstep zones directory, and
everything we don't want was removed.

cd $GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones
(cd /usr/local/etc; tar -cf - zoneinfo) | tar -xvf -
rm -rf zones
mv zoneinfo zones
(cd zones; rm -rf localtime posixrules Factory zone.tab iso3166.tab)

6. A temporary list of all the zone names was created

find zones -type f -print | sed -e 's/zones\///' > /tmp/tz/zone_names

7. The create_abbrevs and create_regions files were built
'create-regions' and 'create-abbrevs' only work on systems with the
GNU C library (e.g. Linux).  This isn't a problem since the
distributed files work on any system.

make

8.  The 'abbreviations' file was created by running 'create-abbrevs' with
the arguments set to all the possible time zone names.

rm -f abbreviations
for i in `cat /tmp/tz/zone_names`
do
  obj/create-abbrevs $i >> abbreviations
done

9. The 'regions' file was created by running 'create-regions' with the
arguments set to all the possible time zone names.

rm -f regions
for i in `cat /tmp/tz/zone_names`
do
  obj/create-regions $i >> regions
done

10. Finally, I tidied up.

rm -rf /tmp/tz
make distclean

11. hard links in the `zone' directory were purged

cp -R zones zones.new
rm -Rf zones
mv zones.new zones

12. This README file in the
  $GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones
  directory was updated.

13. The .tar file to be included in the gnustep base distribution 
was simply obtained at this point by running tar on the 
$GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base/NSTimeZones directory:

cd $GNUSTEP_SYSTEM_ROOT/Library/Libraries/Resources/gnustep-base
tar cfv NSTimeZones.tar NSTimeZones

Possible questions
=======================
Why do I use the time zone data at <ftp://elsie.nci.nih.gov/pub/>
instead of using system functions for working with time zones?

First, time zone names sometimes differ from system to system (Linux
has "Asia/Seoul", which the Solaris installation I use doesn't).

Second, at least for strict POSIX the system functions are woefully
inadequate.  There is no reliable way to obtain the offset from UTC,
there is absolutely no way to find out what time zone details there
may be (short of sorting through all time), no way to find a time zone
name from an abbreviation, etc.

=======================
Yoo C. Chung <wacko@laplace.snu.ac.kr>

Updated August 2000 by R Frith-Macdoanld
Updated (minor) January 2001 by Nicola Pero
Updated (minor) September 2001 by R Frith-Macdoanld
Updated (minor) March 2002 by R Frith-Macdoanld
Updated (minor) September 2002 by R Frith-Macdoanld
Updated (minor) July 2004 by R Frith-Macdoanld
Updated (minor) October 2004 by R Frith-Macdoanld
Updated (minor) Dec 2004 by A Fedor (Add abbreviations.plist)
Updated (minor) February 2006 by R Frith-Macdoanld
Updated (minor) August 2006 by R Frith-Macdoanld
Updated (minor) March 2007 by R Frith-Macdoanld
