This project has moved. For the latest updates, please go here.

Changing timezones for RollingXmlTraceListener

Sep 24, 2012 at 1:25 PM
Edited Sep 24, 2012 at 1:26 PM


I've got the RollingXmlTraceListener currently setup like so:

	<add name="RollingXml" 
		type="Essential.Diagnostics.RollingXmlTraceListener, Essential.Diagnostics" 
		traceOutputOptions="ProcessId, DateTime, Timestamp, LogicalOperationStack, Callstack, ThreadId"/>

I'm in the UK so we're currently in British Summer Time (BST) which is GMT+1. The listener is creating WCF trace records with a GMT TimeCreated timestamp like so:

<E2ETraceEvent xmlns="">
<System xmlns="">
<TimeCreated SystemTime="2012-09-24T12:48:18.3850472" />

Looking at how the normal (automatic) WCF tracing works, it logs timestamps like so:

<TimeCreated SystemTime="2012-09-24T12:47:40.1785020Z" />

Notice the 'Z' on the end of the SystemTime to show that this time is in UTC and not in local.



Onto the question...

Is there a way to get the the XmlRollingTraceListener to log these timestamps in 'Z' format to show these times are UTC?




Nov 11, 2012 at 3:56 AM

It is probably a bug, so I'll try and put some something in the issue tracker to fix it. (If I haven't got around to logging it yet, feel free to add the issue yourself).

Also, this shouldn't be too hard to fix in the source code if you want to fork.


Apr 17, 2013 at 11:29 AM
I added this as issue #22.

There is a fix in the source code, which will be in the next release.