[An old reply I found lurking in my Drafts folder. May as well send it.]

On Tue, 27 Jan 2004, Andrew Pam wrote:

> On Sat, Jan 24, 2004 at 09:06:34PM +0000, [EMAIL PROTECTED] wrote:
> > Frankly, for the few extra bytes I would lose on each line, I
> > would much prefer having the logging timestamp in local time. In part, it
> > makes things easier to deal with when you are searching for events in all
> > of the stored/rotated logs.
> 
> The main reason to avoid local time is the problems caused by Daylight
> Saving timezone changes twice a year (unless your region doesn't do that.)
> Besides, if you really want local time it's easy enough to convert when
> required by piping through tai64nlocal.

There are plenty more reasons why logging with tai64 timestamps is a good 
idea. tai64 timestamps sort lexicographically (unlike local time) so you 
can combine then sort multiple log files (from different services) and 
correlate events. It's easy to write a filter which selects a slice of log 
file covering any particular time period. Etc.

It's easy to convert from tai64 time to local time, but difficult or 
impossible to do the converse.

---
Charlie


Reply via email to