Re: [Exim] TZ logging buglet

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Vadim Vygonets
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] TZ logging buglet
Quoth Philip Hazel on Mon, Feb 21, 2000:
> On Sat, 19 Feb 2000, Jeffrey Goldberg wrote:
> > When exim is called locally, it picks up the TZ from the environment of
> > the user. It uses that TZ when putting the date stamp in the log file.
> > The date stamp in the log file, however, doesn't list timezone off-set.
>
> This item is already on my bug list. The problem is that it not easy to
> fix. I have been sent several idea which might work on different OS, and
> at some point I mean to try them.


Well. On OSes using David Olson's tzcode/tzdata package (which
I'm familiar with) such as all modern BSDs and probably Solaris,
SunOS, OSF1/Ultrix/Digital Unix/Compaq Tru64, and Ultrix, there
is a function tzsetwall(3) which does exactly what you need --
sets local timezone WRT /etc/localtime (or similar) without
looking at TZ enviroment variable. On Linux (which probably uses
tzdata, but their tzcode implementation is different) and
probably other systems you can unset the TZ environment variable
and call tzset(3). You can use the same technique with David
Olson's tz pachage, too.

> You would think that there is some standard system call that says "reset
> the time zone to the default on this host", but so far I have not found
> such a thing.


I don't know whether tzset(3) is defined in POSIX, but it well
may be. Anyway, I'll be glad to help you with finding
information about timezones.

> I don't want to just ignore time-zone information, as that would make
> all Exim times GMT, which is not nice.


In my opinion, the best thing to do is to provide an option
whether to use UTC or local time, as there are people who prefer
their logs in UTC for various reasons (one of which may be that
during DST->STD (say, BST->GMT) transmission, there is an hour of
"ambiguous" time, i.e., there is twice 00:30 or something).

Because of time ambiguity, it would be nice to provide the option
to include timezone name in the logs. Some people would like it
(I would probably enable it).

Vadik.

-- 
Strange Fruit.  A brilliant way to describe
somebody hanging from a tree...
    -- Marcus Miller