--- Nicko Cadell <[EMAIL PROTECTED]> wrote:
> %date{format='''DATE: ''yyyy-MM-dd ''TIME: ''hh:mm:ss
> tt',hourOffset=-4}
That's ugly! This isn't much better...it gets rid of the quotes:
DATE: %d{format=yyyy-MM-dd,hourOffset=-4} TIME: %d{t,hourOffset=-4}
> My only problem with the code is that some places use half hour
> increments in the timezone offset so the hourOffset must be a float
> or
> something like that so that Australian Central Daylight Time can have
> hourOffset=10.5
Someone contacted me off list suggesting we could use well known city
name constants like New_York so we would wouldn't have to handle
changing between Daylight Time and Normal Time. He also pointed out
that if someone doesn't change the -4 to a -5 when Normal Time starts
there will be log files with incorrect dates in them. Another good idea
would be to recommend that people continue to store UTC time in their
log files and use this new notation only as a quick method for
converting to local time. If the date appeared in UTC then it wouldn't
matter if the hourOffset didn't get changed at the exact time that
Daylight Time began/ended.