5 hours into the future with logging

Topics: Logging Application Block
Mar 22, 2007 at 4:45 PM
Edited Mar 22, 2007 at 5:02 PM
This must be caused by day time saving, somehow..?

I know my workstation has been patched for the new day time by our IT dept, my clock displays correctly, yet when I log any LogEntry with the Logging Application Block, whether it's to a flat file or the event viewer, the timestamp is 5 hours into the furture...humm.....

Even more interesting, is in the event viewer, the Time: label will show the correct time, but the Timestamp in the Description: will be 5 hours ahead.

(I dug around in the LogEntry, found that the timestamp property is using UTC time, althought I don't know why..? as this might lead to confusion...)
Mar 22, 2007 at 5:02 PM
The logging formatter will write timestamps in UTC format by default. If you're using EntLib 3.0 or you've manually made the change to EntLib 2.0 described here, you can choose to format the timestamps as local times by modifying the template to read {timestamp(local)}

Jun 25, 2007 at 3:13 PM
Using {timestamp(local)} changes indeed the timestamp format in the message log,
but when you log into a database, the "timestamp" column is still in UTC format
Is there a way to change it ? (without changing a lot of code, my program is almost finished :p)