[comp.sys.mips] Setting timezone in sendmail 5.61

cczdao@mips.nott.ac.uk (David Osborne) (03/07/91)

The sendmail I'm running on our M/2000 under RiscOS 4.51 always seems
to believe it's operating in the Pacific timezone, so the timestamps
are 8 hours behind GMT.  I've checked I have a Ot option in my
sendmail.cf to set the timezones appropriately

# time zone names (V6 only)
OtGMT,BST

but the comment makes me wonder if timezones are still supported in
this way (the .cf file is generated using the UK-Sendmail 2.1 package).
Our /etc/TZ file is set up correctly.  Is there anything else which
should be set to make sendmail use the GMT timezone?

--dave
(David Osborne, Cripps Computing Centre, University of Nottingham)

lawc@super.ece.jhu.edu (Chiu-Tai Law) (03/08/91)

In article <1991Mar7.092840.13878@cs.nott.ac.uk> cczdao@mips.nott.ac.uk (David Osborne) writes:
>The sendmail I'm running on our M/2000 under RiscOS 4.51 always seems
>to believe it's operating in the Pacific timezone, so the timestamps
>are 8 hours behind GMT.  I've checked I have a Ot option in my
>sendmail.cf to set the timezones appropriately
>
># time zone names (V6 only)
>OtGMT,BST
>
>but the comment makes me wonder if timezones are still supported in
>this way (the .cf file is generated using the UK-Sendmail 2.1 package).
>Our /etc/TZ file is set up correctly.  Is there anything else which
>should be set to make sendmail use the GMT timezone?
>
>--dave
>(David Osborne, Cripps Computing Centre, University of Nottingham)

Since this question occurs more than once, I decide to post it.
You need to set the time zone in the bsd side also with zic.
Look at the man page for zic and files in /etc/zoneinfo.
-- 
Chiu Tai Law				lawc@super.ece.jhu.edu
(301) 338-7976

michi@ptcburp.ptcbu.oz.au (Michael Henning) (03/12/91)

cczdao@mips.nott.ac.uk (David Osborne) writes:

>The sendmail I'm running on our M/2000 under RiscOS 4.51 always seems
>to believe it's operating in the Pacific timezone, so the timestamps
>are 8 hours behind GMT.  I've checked I have a Ot option in my
>sendmail.cf to set the timezones appropriately

># time zone names (V6 only)
>OtGMT,BST

>but the comment makes me wonder if timezones are still supported in
>this way (the .cf file is generated using the UK-Sendmail 2.1 package).
>Our /etc/TZ file is set up correctly.  Is there anything else which
>should be set to make sendmail use the GMT timezone?

Sendmail explicitely unsets the environment variable TZ, and in most
implementations I have seen, the Ot option is ignored. The best way to fix
it is to hack the source. This means that your users can claim to have sent
their mail at a different time than they actually sent it, by setting TZ,
but I don't believe that this is a problem for most installations.

						Michi.
-- 
      -m------- Michael Henning			+61 75 950255
    ---mmm----- Pyramid Technology		+61 75 522475 FAX
  -----mmmmm--- Research Park, Bond University	michi@ptcburp.ptcbu.oz.au
-------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA	uunet!munnari!ptcburp.oz!michi

cczdao@mips.nott.ac.uk (David Osborne) (03/14/91)

In article <344@ptcburp.ptcbu.oz.au> michi@ptcburp.ptcbu.oz.au (Michael Henning) writes,
(following up my enquiry)
>>Our /etc/TZ file is set up correctly.  Is there anything else which
>>should be set to make sendmail use the GMT timezone?
>
>Sendmail explicitely unsets the environment variable TZ, and in most
>implementations I have seen, the Ot option is ignored. The best way to fix
>it is to hack the source. This means that your users can claim to have sent
>their mail at a different time than they actually sent it, by setting TZ,
>but I don't believe that this is a problem for most installations.

Nothing that drastic was required (though I do have the 5.61 sources).

Someone, whose name I have lost, suggested the solution, and that
was to use zic to set up the default timezone using the zoneinfo
package.  That not only cured the timezone problem for sendmail,
but also the kernel logging to syslogd, which was also running under
the belief it was in the PST zone.

Simply saying "zic -d GMT" fixed things.
I like easy solutions like that!

--dave

michi@ptcburp.ptcbu.oz.au (Michael Henning) (03/18/91)

cczdao@mips.nott.ac.uk (David Osborne) writes:

>Nothing that drastic was required (though I do have the 5.61 sources).

>Someone, whose name I have lost, suggested the solution, and that
>was to use zic to set up the default timezone using the zoneinfo
>package.  That not only cured the timezone problem for sendmail,
>but also the kernel logging to syslogd, which was also running under
>the belief it was in the PST zone.

>Simply saying "zic -d GMT" fixed things.
>I like easy solutions like that!


Interesting, it sure beats hacking the source...

Can you tell us what 'zic' does ?  First thing I ever heard of it...

							Michi.
-- 
      -m------- Michael Henning			+61 75 950255
    ---mmm----- Pyramid Technology		+61 75 522475 FAX
  -----mmmmm--- Research Park, Bond University	michi@ptcburp.ptcbu.oz.au
-------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA	uunet!munnari!ptcburp.oz!michi

jay@mips.com (Jay McCauley) (03/19/91)

In article <352@ptcburp.ptcbu.oz.au> michi@ptcburp.ptcbu.oz.au (Michael Henning) writes:
>cczdao@mips.nott.ac.uk (David Osborne) writes:
<<<< original request and answer deleted >>>>
>
>Can you tell us what 'zic' does ?  First thing I ever heard of it...
zic is the Zone Information Compiler from the 4.3 BSD Tahoe baseline.
Programs compiled with -systype bsd43 wind up using libraries that use
the compiled timezone information processed by zic.  This is more flexible
and elegant than the System V support of timezones.  There is a man page
for zic, and I believe there was some brief discussion of it in the
Release Notes.

As has been discussed here before, when you are unlucky enough not to
be in the US/Pacific timezone (the default), you must change both
the System V and BSD 4.3 notions of what timezone you're in.  The
System V one is set from the contents of the file /etc/TZ which is
"classic" system V, XXXNYYY
  where:
  XXX - three letter standard time abbreviation
  N   - offset from GMT
  YYY - three letter daylight savings time abbrev
The BSD 4.3 timezone is set using "zic -l ZONENAME"  where, unfortunately,
the ZONENAMES are not obvious to the casual user.  Look in /etc/zoneinfo/SOURCES
for their values.

I suppose that in a perfect world, we'd settle on one mechanism.  Fears of
hidden compatibility problems and the perennial resource crunch have not
yet allowed this to happen.  Work for another day!

I'd expect our Customer Support Hotline can fill in any missing details about
this if anybody is having trouble.  They're usually quite helpful.
Jay
>
>							Michi.
>-- 
>      -m------- Michael Henning			+61 75 950255
>    ---mmm----- Pyramid Technology		+61 75 522475 FAX
>  -----mmmmm--- Research Park, Bond University	michi@ptcburp.ptcbu.oz.au
>-------mmmmmmm- Gold Coast, Q 4229, AUSTRALIA	uunet!munnari!ptcburp.oz!michi
-- 
Jay McCauley
MIPS Computer Systems, 928 E. Arques, Sunnyvale, CA 94086 (408)524-8211
{decwrl,pyramid,ames}!mips!jay         jay@mips.com

cczdao@mips.nott.ac.uk (David Osborne) (03/20/91)

In article <352@ptcburp.ptcbu.oz.au> michi@ptcburp.ptcbu.oz.au (Michael Henning) writes:
>cczdao@mips.nott.ac.uk (David Osborne) writes:
>
>>Someone, whose name I have lost, suggested the solution, and that
>>was to use zic to set up the default timezone using the zoneinfo
>>package.
[...]
>>Simply saying "zic -d GMT" fixed things.

>Can you tell us what 'zic' does ?  First thing I ever heard of it...

zic is to zoneinfo as tic is to terminfo...
it's the timeZone Info Compiler.

SEE ALSO
    zic(8-BSD)


--dave
-- 
David Osborne