Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon4.gif   Strange timezone in email sent with Postfix, posted by Joseph Giaime on Thu Jan 29 00:24:44 2004 
    icon2.gif   Re: Strange timezone in email sent with Postfix, posted by Stefan Ritt on Thu Jan 29 09:25:45 2004 
Message ID: 462     Entry time: Thu Jan 29 09:25:45 2004     In reply to: 461
Icon: Reply  Author: Stefan Ritt  Author Email: stefan.ritt@psi.ch 
Category: Bug report  OS: Mac OSX  ELOG Version: 2.3.9 
Subject: Re: Strange timezone in email sent with Postfix 
> Instead of something like "Date: Wed, 28 Jan 2004 14:46:16 -0600", the
> "-0600" is replaced by a large number that doesn't correspond with anything
> I can figure out.  This is the sort of thing that does no real harm, but the
> notebook users keep complaining. 

This is caused by the elogd program itself. To produce the "-0600", it uses the 
variable "timezone", which is defined as difference in seconds between local time 
and coordinated universl time. This works find under Windows, Linux, FreeBSD, but 
apparently not under MacOSX. Although this variable is defined, it's unassigned. 

The code where this is used is in sendmail(), at the lines

   time(&now);
   ts = localtime(&now);
   strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S", ts);
   offset = (-(int) timezone);
   if (ts->tm_isdst)
      offset += 3600;

The current localtime gets written into "buf", then the timzone offset gets 
corrected by the daylight savings time, then the offset is used to produce the 
"-0600".

So if anybody being familiar with MacOSX has some idea, please let me know.

- Stefan
ELOG V3.1.5-fe60aaf