Enterprise Library 5.0 - Application Logging - Incorrect DateTime

元气小坏坏 提交于 2019-11-30 17:24:11

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)}

Nitin

Changing in the config file will just reflect in the extended properties, the "TimeStamp" field will still show the time in UTC format. To Change it at both place you can just update it in your code using the TimeStamp property of LogEntry. Refer here: EnterpriseLibrary.Logging writes logs with 1 hour difference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!