Wrong timestamp in message

Topics: Logging Application Block
Feb 1, 2008 at 9:22 PM
Hello,

I'm using 3.0 Logging App Block. When log is written to Event Viewer, Event Viewer Time shows current system time timestamp. But the contents of the log display totally different time (when you double-click on the log and Event Properties window comes up, this into is displayed in Description):

Timestamp: 2/1/2008 9:17:55 PM <---- this is not system time, it's a few hours off.
Message: Test
Category: Default Category
Priority: -1
EventId: 1
Severity: Information
Title:
.......

This incorrect timestamp is produced by the Ent Library. Does anyone know how this can be fixed?
This is the line of code I use to log this entry :
Microsoft.Practices.EnterpriseLibrary.Logging.Logger.Write("Test");

Thank you.
Feb 3, 2008 at 2:59 PM
I suspect the issue is that you are using the default UTC, rather than the local time.

To correct this you can use {timestamp(local)}

The following links should help:

http://blogs.msdn.com/tomholl/archive/2006/01/22/516055.aspx
http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=10131

Many thanks,

Gareth