Saleem
Saleem

Reputation: 145

How to set time for NUnit3 TestResult file?

I am new to NUnit test. I have created a test. The results appear in TestResult.xml file. Start and End time appear start-time="2016-06-21 14:32:17Z" end-time="2016-06-21 14:32:50Z" I would like to the date/time to appear what is set in my computer's locale (EST). I don't see any parameters that I can use to change this. How do I fix this? Thanks. Saleem

Upvotes: 0

Views: 686

Answers (1)

Rob Prouse
Rob Prouse

Reputation: 22647

There are no parameters to change the timezone in NUnit. In NUnit 3, all times are reported in UTC. With the majority of tests running on continuous integration servers in the cloud these days, local time ended up being even more confusing for developers, so it was decided to go with one consistent time zone. Unfortunately, this is a bit of an inconvenience for developers running tests on their local machines.

Feel free to enter an issue at https://github.com/nunit/nunit/issues. A command line parameter could be added to give you the option to output the times in your local time zone.

Update - The issue has been added, thanks. If other SO users want to see this feature implemented, please vote/comment on the issue.

Upvotes: 3

Related Questions