[BusyBox] Query about the date function

tom at ceisystems.com tom at ceisystems.com
Fri Jul 11 04:33:15 UTC 2003


Hello all,

	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.  Most distros use the
"zoneinfo" files, which contain some sort of binary data (executable or
not, I do not know).  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.  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".

Good luck,
Thomas Cameron
CEI Systems, Inc.


-----Original Message-----
From: Sid Wade [mailto:sid at vivato.net] 
Sent: Thursday, July 10, 2003 8:06 PM
To: Andrew Dennison; busybox at busybox.net
Cc: Mark Rakes
Subject: RE: [BusyBox] Query about the date function


/etc/TZ???  Whazzat?

This gets more and more confusing.  I've googled for info on this, and
it looks like there are 2 items involved:  1) The symlink from
/etc/localtime to one of the timezone files in /usr/share/zoneinfo, and
2) the environment variable TZ.  If I set TZ=PST8PDT, the date function
properly shows 'PDT', but apparently this is only because the variable I
set is in the proper name/offset/daylight-time/etc/etc format.  Setting
TZ equal to one of the other filenames, such as 'Karachi', dumps me back
to displaying UTC.  I'm trying to figure out just what the symlink is
supposed to do in the grand scheme of things.  The files in
/usr/share/zoneinfo are executables, so must be used by some function/s.
To further confuse things, on my Redhat box, there is the same symlink
to PST8PDT, but no TZ environment variable, and it displays date with
PDT.

In any case, thanks for your reply - I need all the help I can get :-)

> -----Original Message-----
> From: Andrew Dennison [mailto:andrew.dennison at motec.com.au]
> Sent: Thursday, July 10, 2003 4:33 PM
> To: Sid Wade; busybox at busybox.net
> Cc: Mark Rakes; Dan Lohman
> Subject: RE: [BusyBox] Query about the date function
> 
> This works for me with busybox unstable:
> # cat /etc/TZ
> EST10
> # date
> Fri Jul 11 09:29:32 EST 2003
> # date -u
> Fri Jul 11 19:29:33 UTC 2003
> 
> Andrew
> 
> -----Original Message-----
> From: busybox-bounces at busybox.net
[mailto:busybox-bounces at busybox.net]On
> Behalf Of Sid Wade
> Sent: Friday, 11 July 2003 7:36 AM
> To: busybox at busybox.net
> Cc: Mark Rakes; Dan Lohman
> Subject: [BusyBox] Query about the date function
> 
> 
> I don't seem to be able to get anything but UTC in the timezone.  The
link
> from /etc/localtime is set properly, in my case to 
> /usr/share/zoneinfo/PST8PDT, but all I show is UTC.  Am I missing 
> something here?
> 
> Sid Wade
> 

_______________________________________________
busybox mailing list
busybox at busybox.net http://busybox.net/mailman/listinfo/busybox



More information about the busybox mailing list