Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enterprise Library 5.0 - Application Logging - Incorrect DateTime

I am using Microsoft Enterprise library 5.0 for application logging of my .net application.

Logging is working properly. But the problem is the DateTime that is being logged along with the logging message is incorrect. There is a time difference of 6.5 hrs.

How can i correct this?

like image 966
Sidharth Avatar asked Dec 30 '10 09:12

Sidharth


1 Answers

Change your text formatter (in app.config) to use the local server time, otherwise it defaults to UTC.

e.g. change {timestamp} token to {timestamp(local)}

like image 174
sev Avatar answered Sep 20 '22 11:09

sev