Subject: Re: Where does DOS & PC-Pine get timezone?

From: David L Miller <[email-masked]>
Date: Wed, 24 Aug 1994 21:29:25 -0700 (PDT)

DOS uses the TZ environment variable.  Note that the rfc822_date() function
is very OS-dependent and uses different code for different platforms... 

|\ |  |\/|  David L. Miller    [email-masked]  (206) 685-6240
|/ |_ |  |  Software Engineer, Pine Development Team   (206) 685-4045 (FAX)
University of Washington, Networks & Distributed Computing, JE-20
4545 15th Ave NE, Seattle WA 98105, USA

On Wed, 24 Aug 1994, Alex Nishri wrote:

> PC-Pine is getting the time and timezone information in the rfc822 "Date:"
> header correct in the mail that I send.  But where does it get its
> information from?  Looking at the source, I see that it uses tzset(), time(),
> and localtime() to do its magic; I know how these routines work on my Unix
> machine.  But where do these C routines get to know about timezones on my
> MS-DOS machine?  There doesn't appear to be any way to set the timezone in DOS?
> 
>

---

From: [email-masked] (Alex Nishri)
Date: Wed, 24 Aug 1994 23:14:44 GMT

---

From: [email-masked] (Alex Nishri)
Date: Thu, 25 Aug 1994 16:12:36 GMT

I solved my problem.  This message may be of use to others.

PC-Pine is always getting the "Date:" field timezone information correct in
any mail we send.  We had never set the DOS TZ variable and it was not
obvious where the timezone information was coming from.

The only reason we pursued this is because we once had a problem with ECSMail
for Windows getting the timezone wrong once in a while and wanted to make
sure that affliction would not affect Pine.  In that case, we also never
figured out where ECSMail was getting the timezone information from and hence
we didn't know why it was randomly wrong.  ISA told us that there was a DOS
or Windows system call for setting and getting the timezone, and that is
where ECSMail was getting it from.  The default timezone for MS-DOS, if its
not set, is Pacific Standard Time/Pacific Daylight Time (i.e. the correct
timezone for the Microsoft headquarters); so what software was setting it to
Eastern time, which is appropriate for Toronto where I am?  (ISA fixed the
problem by providing Windows ECSMail with a timezone configuration option
which overrides the internal system timezone.)

This morning we finally figured it out.  The date, time, and most important,
the timezone are set by logging into our Novell Netware server.  (A standard
part of configurating a Netware server is telling it the timezone its in.)
When we rebooted a PC, explicitly did not login to out Novell Netware server,
and tried sending messages from Pine--it used Pacific Daylight Time.  (Both
the sendmail and zmailer SMTP servers will change the "Date:" *timezone* so
it is the local one, by changing the *time*.  As a result, the symptom users
will see is that the *time*, not *timezone*, is wrong.)

The moral of the story, as David Miller correctly says, is you should set the
DOS TZ environment variable to explicitly give the timezone.  (With ECSMail,
ISA now provides a number of alternative ways to specify the timezone.  For
Macintosh packages, the situation is different; packages such as Mailstorm
and Eudora use the "Map" control panel which unfortunately is half baked--the
MacOS understands timezones, but not the concept of daylight saving time.)

Alex Nishri
University of Toronto

In article <[email-masked]>,