log4net.ext.json - DateTime formatting

161 views Asked by At

DateTime formatting in log4net.ext.json appears to be inconsistent, sometimes I get standard json style dates

"CreatedDateTimeUtc": "/Date(1496846467024)/"

sometimes

"PublishedAt": "2017-06-07T14:41:06.7098470",

is there a way I can specify which format I'd like? or is it dependent on a property on the DateTime?

what I'd really like is the format it uses for the log date

"date": "2017-06-07T15:41:07.0244105+01:00",

1

There are 1 answers

0
Robert Cutajar On BEST ANSWER

This should be the case in recent 2.0.8 release. See the test case for SerializeDateTime.