[comp.unix.aux] Time Zone trouble...

whitney@think.COM (David Whitney) (04/06/88)

Be sure that all .login files are changed to use EST5EDT. Also, change
/etc/sysinitrc (it's in there somewhere as well).

I've set every occurrance I could find, yet the system will still (on random
occasion) give me the right time in PDT (ie, if it's 10 am, it'll say 0700PDT).

A seperate problem I have is this: now that we are running on Daylight Savings,
A/ux reports the time as one hour later than what the Mac says the time is.
In order for me to have A/ux tell me accurately that it is 10 am, I must
set the mac to 9 am. Why is this?

David Whitney, MIT '90                     Still learning about my Apple //GS
{the known universe}!ihnp4!think!whitney   and all of its secrets. Any and all
whitney@think.com                          technical info appreciated.
DISCLAIMER: If they only knew what I was doing and saying here...

jackie@Apple.COM (Hernan'Jackie' Macapanpan) (04/07/88)

In article <18918@think.UUCP>, whitney@think.COM (David Whitney) writes:
> Be sure that all .login files are changed to use EST5EDT. Also, change
> /etc/sysinitrc (it's in there somewhere as well).
> 
> I've set every occurrance I could find, yet the system will still (on random
> occasion) give me the right time in PDT (ie, if it's 10 am, it'll say 0700PDT).
> 
> A seperate problem I have is this: now that we are running on Daylight Savings,
> A/ux reports the time as one hour later than what the Mac says the time is.
> In order for me to have A/ux tell me accurately that it is 10 am, I must
> set the mac to 9 am. Why is this?
> 
> David Whitney, MIT '90                     Still learning about my Apple //GS
> {the known universe}!ihnp4!think!whitney   and all of its secrets. Any and all
> whitney@think.com                          technical info appreciated.
> DISCLAIMER: If they only knew what I was doing and saying here...

Here's an excerpt from the file README from A/UX release 1.0. Hope it helps.

Time zone handling
	The TZ environment variable is used to determine your local timezone.
	The value of TZ references the name of a timezone file to be used.
	These files are to be found in the directory, /etc/zoneinfo. As
	shipped, TZ is set to "PST8PDT", corresponding to the file
	/etc/zoneinfo/PST8PDT.  If the value of TZ is set to the null string,
	Greenwich Mean Time will be used. If the TZ variable is unset, the
	file /etc/zoneinfo/localtime will be used as a default value.

	As distributed, A/UX is configured for U.S. Pacific Standard Time.
	If you are in a different timezone, you will want to change this.
	To change your timezone, determine which file in /etc/zoneinfo
	describes your timezone. If necessary, create you own file using
	tzdump(1M) and tzic(1M). Relink the file /etc/zoneinfo/localtime
	to your time zone file.

	The TZ variable is currently being set in a number of A/UX files.
	You must edit these files, either removing or changing the setting
	of TZ. Edit the following files: /.profile, /.login, /etc/bcheckrc,
	/etc/profile, /etc/rc, /etc/sysinitrc, and /users/start/.login.

----------------------------------------------------------------------------
 Disclaimer: I works heres, buts theys don'ts knows I's cans types.

Hernan 'Jackie' Macapanpan			      amdahl \
Technical Communications/Direct Response Center	  pyramid!sun - apple!jackie
Apple Computer, Inc. (408) 996-1010		      decwrl /
---------------------------------------------------------------------------

buzz@phoenix.Princeton.EDU (Mahboud Zabetian) (04/07/88)

In article <7848@apple.Apple.Com> jackie@Apple.COM (Hernan'Jackie' Macapanpan) writes:
>
>Here's an excerpt from the file README from A/UX release 1.0. Hope it helps.
>
>Time zone handling
....
>
>	The TZ variable is currently being set in a number of A/UX files.
>	You must edit these files, either removing or changing the setting
>	of TZ. Edit the following files: /.profile, /.login, /etc/bcheckrc,
>	/etc/profile, /etc/rc, /etc/sysinitrc, and /users/start/.login.
>

Included in this posting is a letter I sent myself from faux-pas, our A/UX
computer.  Notice the Date line in the mail header.  Also I have included the
output of 'date' and 'grep TZ /etc/*'.


From root@faux-pas Wed Apr  6 21:02:25 1988
Date: Tue, 5 Apr 88 18:01:42 PDT
From: root@faux-pas (System Operator)
To: buzz
Subject: Time Zone test
Status: R
This is what 'date' outputs:

	Wed Apr  6 21:00:23 EDT 1988

This is what 'grep TZ /etc/*' gave me:

	bcheckrc:TZ=EST5EDT
	bcheckrc:export TZ
	cshrc:setenv TZ EST5EDT
	profile:TZ=EST5EDT
	profile:export LOGNAME TZ MAILCHECK MAILPATH
	rc:TZ=EST5EDT; export TZ
	rc.orig:TZ=PST8PDT
	rc.orig:export TZ
	sysinitrc:TZ=EST5EDT; export TZ

These are the files that have occurrences of TZ in them.  They all seem correct
to me (rc.orig is what rc looked like before I changed it).  But as you can see
in the mail header, the time is in PDT.  This is similar to the messages of
'shutdown' and some other system utilities.  Anyone know why?
-- 
Mahboud Zabetian	buzz@phoenix.princeton.edu	      (609) 520-1271
183 Little Hall	    root@faux-pas.princeton.edu (A/UX!)    Princeton U. NJ 08544
<<<THIS SPACE FOR RENT>>>(Was: Need a soon-to-graduate hard/soft-ware engineer?)
<<<                   >>>>>>  ( But I'll still consider good offers though :-)

jackie@Apple.COM (Hernan'Jackie' Macapanpan) (04/08/88)

In article <2418@phoenix.Princeton.EDU>, buzz@phoenix.Princeton.EDU (Mahboud Zabetian) writes:
> From: root@faux-pas (System Operator)
> To: buzz
> Subject: Time Zone test
> Status: R
> This is what 'date' outputs:
> 
> 	Wed Apr  6 21:00:23 EDT 1988
> 
> These are the files that have occurrences of TZ in them.  They all seem correct
> to me (rc.orig is what rc looked like before I changed it).  But as you can see
> in the mail header, the time is in PDT.  This is similar to the messages of
> 'shutdown' and some other system utilities.  Anyone know why?

Ooops, looks like you'd forgotten to link /etc/zoneinfo/EST5EDT to
/etc/zoneinfo/localtime.

Hope this helps.

----------------------------------------------------------------------------
 Disclaimer: I works heres, buts theys don'ts knows I's cans types.

Hernan 'Jackie' Macapanpan			      amdahl \
Technical Communications/Direct Response Center	  pyramid!sun - apple!jackie
Apple Computer, Inc. (408) 996-1010		      decwrl /
----------------------------------------------------------------------------

vicki@Apple.COM (Vicki Brown) (04/08/88)

In article <18918@think.UUCP> whitney@think.UUCP (David Whitney) writes:
>Be sure that all .login files are changed to use EST5EDT. Also, change
>/etc/sysinitrc (it's in there somewhere as well).
>
>

If you have Release 1.0 of A/UX, full information on setting timezones properly
can be found in /README, the on-line release notes.  Briefly, the idea is this.
Timezones are determined by files in /etc/zoneinfo.  One file,
/etc/zoneinfo/localtime, is a link to your specific time zone file.  As
shipped the link is to /etc/zoneinfo/PST8PDT for Pacific Coast time.  If you
remove /etc/zoneinfo/localtime and remake the link to another zone file (e.g. 
EST5EDT), you will be set for Eastern time.

The catch is that the TZ environment variable overrides the value of
/etc/zoneinfo/localtime.  You will need to locate and change (or remove) all
references to TZ in system run commands files (/.[lcp]*, /etc/profile,
/etc/*rc).  If you remove all references to TZ, everywhere, and make the
localtime link properly, your A/UX system should always report the correct
timezone.

-- 
Vicki Brown
A/UX Engineering		vicki@apple.com

(all opinions are my own and do not necessarily reflect those of my employer)

paul@unisoft.UUCP (n) (04/09/88)

In article <18918@think.UUCP> whitney@think.UUCP (David Whitney) writes:
>A seperate problem I have is this: now that we are running on Daylight Savings,
>A/ux reports the time as one hour later than what the Mac says the time is.
>In order for me to have A/ux tell me accurately that it is 10 am, I must
>set the mac to 9 am. Why is this?


The problem here is that Unix stores it time in GMT regardless of the local
time - EDT5EST etc just tell the time printing software how to display it.
The MacOS stores its internal time as local time so you have to change it
when DST comes along - there is a magic number which you can set in SASH
to set the difference between local time and GMT - of course this changes when
DST comes in .....


	Paul

-- 
Paul Campbell, UniSoft Corp. 6121 Hollis, Emeryville, Ca
	E-mail:		..!{ucbvax,hoptoad}!unisoft!paul  
Nothing here represents the opinions of UniSoft or its employees (except me)
"Nuclear war doesn't prove who's Right, just who's Left" (ABC news 10/13/87)

vicki@Apple.COM (Vicki Brown) (04/09/88)

In article <18918@think.UUCP> whitney@think.UUCP (David Whitney) writes:
>A seperate problem I have is this: now that we are running on Daylight Savings,
>A/ux reports the time as one hour later than what the Mac says the time is.
>In order for me to have A/ux tell me accurately that it is 10 am, I must
>set the mac to 9 am. Why is this?

Why this is, is that the Mac OS has no notion of Daylight savings time, while
A/UX does.  So, from now through October, A/UX will add another hour to your
time (as shown in the control panel).  However, there is a way to avoid this
muddle.

When you start to boot A/UX, stop sash before the launch.  Change the GMT
bias (in the General dialogue box of the Parameters menu) to be one hour
less (i.e. -240 for East coast, -420 for Pacific coast).  This says that the
Macintosh time is now one hour closer to GMT (true at this time of year).
A/UX will not think you have moved closer to GMT, but will add the extra hour
because it is time for Daylight Savings.  You can check the date in sash before
booting.

Remember to change the GMT bias back again in October.
Got it?

  - vicki
-- 
Vicki Brown
A/UX Engineering		vicki@apple.com

(all opinions are my own and do not necessarily reflect those of my employer)

vicki@Apple.COM (Vicki Brown) (04/12/88)

In article <7875@apple.Apple.Com> vicki@apple.UUCP (Vicki Brown) writes:
>When you start to boot A/UX, stop sash before the launch.  Change the GMT
>bias (in the General dialogue box of the Parameters menu) to be one hour

I apologize for the typographical error in this posting.  The menu to use is
the sash *Preferences* menu.
:-(
Vicki
-- 
Vicki Brown
A/UX Engineering		vicki@apple.com

(all opinions are my own and do not necessarily reflect those of my employer)

richard@bud.UUCP (richard karasik) (04/15/88)

>
>A seperate problem I have is this: now that we are running on Daylight Savings,
>A/ux reports the time as one hour later than what the Mac says the time is.
>In order for me to have A/ux tell me accurately that it is 10 am, I must
>set the mac to 9 am. Why is this?

This is typical in many unix systems that didn't believe our government
when they changed DST inception to beginning of April. You have
to tweak certain hard coded time libraries to make it work on all unix
systems -unless the manufacturer caught it and tweaked it already.

But dont worry, I will fix everything by laying my hands upon the net
in a couple of weeks.
(hoho)


-- 
-----------------------------
 sun!arete!bud!richard      ||"No, I said the BITS .. massage the BITS"
  " !  "  ! " !kass!richard || Richard Karasik
  " !  "  !richard          || Arete Systems Inc   408 922 8271

guy@gorodish.Sun.COM (Guy Harris) (04/18/88)

> This is typical in many unix systems that didn't believe our government
> when they changed DST inception to beginning of April. You have
> to tweak certain hard coded time libraries to make it work on all unix
> systems -unless the manufacturer caught it and tweaked it already.

However, I infer from previous articles that A/UX has adopted the Arthur Olson
timezone scheme (300 cheers for them!), which means the rules are *not*
hard-coded into any libraries - they're fetched from files.  If the Olson files
ever *didn't* include the DST change for 1987, it was a long time ago, and I
think they always included that change.

Thus, A/UX should already know about the new DST rules.

I suspect this is a problem related to differences between the way the Mac OS
keeps time and the way UNIX keeps time.