[BusyBox] Query about the date function

Sid Wade sid at vivato.net
Fri Jul 11 18:11:12 UTC 2003


OK, so that explains why the /etc/localtime symlink didn't do anything.
What I need to be doing, from the CLI 'clock timezone' command, is to
either set the TZ variable to some value in the proper format for the
selected zone, or place the same value in /etc/TZ.  No harder than what
is being done currently with the symlink and it will save me image space
to boot.

Thanks to everyone for your help.

Sid Wade

> -----Original Message-----
> From: Manuel Novoa III [mailto:mjn3 at codepoet.org]
> Sent: Friday, July 11, 2003 10:24 AM
> To: tom at ceisystems.com
> Cc: Sid Wade; andrew.dennison at motec.com.au; busybox at busybox.net; Mark
> Rakes
> Subject: Re: [BusyBox] Query about the date function
> 
> On Fri, Jul 11, 2003 at 12:33:15AM -0400, tom at ceisystems.com wrote:
> > 	I may be way off here, but I think what is happening is the
> > confusion of how a normal distro such as Debian or Gentoo handles
> > timezones, and how uClibc is handling them.
> 
> Yes... in spite of the fact that there is an entry in the uClibc FAQ
> covering this.
> 
> > Most distros use the
> > "zoneinfo" files, which contain some sort of binary data (executable
or
> > not, I do not know).
> 
> The zoneinfo files that glibc uses are derived from David Olson's
> tzcode and tzdata packages ( ftp://elsie.nci.nih.gov/pub/ ).  They
> are not executable.  Do 'man tzfile' for more details on their
> contents.
> 
> You may also want to run 'du' on the /usr/share/zoneinfo tree to
> see why I don't have much motivation to support its use in uClibc.
> Even a gzip -9'd tar file of that data is over 260K on my system.
> 
> > However, uClibc appears (correct me if I am wrong
> > here, Erik, because I have _not_ looked at the code involved) to
simply
> > read the /etc/TZ file or the TZ env. variable.
> 
> When I wrote the uClibc time code, my goal was SUSv3 compliance.
> Hence, the uClibc time code lacks some of the features of the
> glibc time code (leapsecond support for example).  It also used
> the TZ environment variable exclusively for timezone information.
> But this was more than sufficient for most situations where uClibc
> would be used.
> 
> Eventually though, I gave in to the requests to provide a way to set
> the timezone globably.  What I chose to do was allow a file named
> /etc/TZ to contain the timezone setting in the same format as the
> TZ environment variable, so that the amount of additional library
> code would be minimal.
> 
> Now I can certainly understand the desire to be able to specify a
> timezone based on a continent/country/region.  But in my mind, this
> is more of a system administration issue than a uClibc issue.
> I hoped that someone putting together a uClibc-based distribution
> might eventually contribute a single _small_ file (compared to the
> very hefty zoneinfo directory tree) mapping such specifiers to TZ
> settings in standard format, and possibly a small utility to allow
> a user to set either their TZ environment variable or /etc/TZ.
> 
> > This file should simply
> > contain the time zone code (EST), the offset (5), and the Daylight
> > Savings Time name, if there is one (EDT).  This makes the eastern
time
> > zone "EST5EDT".
> 
> For the accepted format for TZ, see
> 
> http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
> 
> Manuel



More information about the busybox mailing list