[Freeipa-devel] timestamps

John Dennis jdennis at redhat.com
Wed Jul 15 18:38:54 UTC 2009


On 07/15/2009 01:29 PM, Dmitri Pal wrote:
> Makes sense but rises another interesting issue with the whole log
> collection and aggregation logic.
> Besides the event we also collect log files. It might be that the
> application creates its log file in local locale (including time stamp).
> How we would be able to index and co-relate log files potentially
> written in different languages or with elements that are language specific.
> I think the only good answer to that is to tell IT admins to configure
> the logging applications to use a specific locale while logging.
> So this means that ELAPI configuration (if the log file is created using
> it) should support an override locale that will be used for things like
> timestamps.
> Such approach would allow to configure systems to emit consistently
> readable logs. If admins what to see all the local dates in Chinese then
> they would be able to configure that.

We can't fix broken applications. If they log timestamps without any 
timezone information it's a bug and they need to fix it. However we can 
assure we always do the right thing. According to my watch :-) it's 
2009, almost a decade after the Y2K debacle, programmers have hopefully 
learned some lessons in the interim about time/date values. We have the 
ISO 8601 standard for time/date representation. Not everything is using 
8601 yet, but it's getting better.

FWIW, in everything I've coded for IPA I'm using ISO 8601 representations.

> So to summarize this  part:
>
> a) I still see a value in local time stamp but there should be a way to
> configure specific locale

I don't see any value in it. The local time stamp is trivially derivable 
from UTC + offset. Adding another timestamp is just redundant information.

Basically you have two choices, you can store UTC+offset or you can 
store 8601+offset, the only difference is whether you trivially convert 
from UTC to local or from local to UTC (it's a difference only in the 
basis of the value).


These links have great resources:
http://www.exit109.com/~ghealton/y2k/yrexamples.html
http://www.exit109.com/~ghealton/.dates.html

-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Freeipa-devel mailing list