Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testsuite.timestamp is in UTC, should be in local #43

Closed
dalle opened this issue Mar 8, 2018 · 5 comments
Closed

testsuite.timestamp is in UTC, should be in local #43

dalle opened this issue Mar 8, 2018 · 5 comments

Comments

@dalle
Copy link

dalle commented Mar 8, 2018

According to JUnit testsuite.timestamp is expected to be in local time without any timezone indicator (yes, it is strange indeed, but never the less).

@palmerj3
Copy link
Collaborator

palmerj3 commented Mar 8, 2018

@dalle ah weird.. I would much prefer UTC. Is this causing a problem for you?

Looking at the spec I'm not seeing where it says it needs local. Just that it needs to be ISO8601_DATETIME_PATTERN compatible.

@ccarpita
Copy link

ccarpita commented Mar 9, 2018

From the Ant dev mailing list I found the closest thing to a format spec:

http://ant.1045680.n5.nabble.com/schema-for-junit-xml-output-td1375274.html

In this definition, timestamp should be xsd:dateTime, which may optionally include a timezone:

http://www.datypic.com/sc/xsd/t-xsd_dateTime.html

EDIT: w3 spec for dateTime: https://www.w3.org/TR/xmlschema-2/#dateTime

@dalle
Copy link
Author

dalle commented Mar 9, 2018

@palmerj3 I would also prefer that JUnit would expect it to be in UTC. In the end it's not causing any real problems which cannot be ignored. The tests are just reported to be run at an incorrect time, of which the time is just an offset depending on the current timezone.

EDIT: Looking through the JUnit source they use java.time.format.DateTimeFormatter.ISO_LOCAL_DATE_TIME to format the datetime.

@AtomiclyCursed
Copy link

AtomiclyCursed commented Aug 16, 2018

Jenkins junit plugin appears to require it in local else you get the following error message.
This is when the local time is set to a time zone that is say +8 - +13

Test reports were found but none of them are new. Did leafNodes run?

For example, /var/jenkins/workspace/blah/blah/blah/junit_editor_iOS.xml is 12 hr old

EDIT: The above was just a filesystem timestamp issue, apparently 3 seconds old is too much (Jenkins is not blocked by the UTC timestamps)

@torarnv
Copy link

torarnv commented Jul 28, 2021

Looking at the spec I'm not seeing where it says it needs local. Just that it needs to be ISO8601_DATETIME_PATTERN compatible.

Drive-by note while investigating similar issues in another framework: The ISO8601 spec seems to mandate local time for unqualified time: https://en.wikipedia.org/wiki/ISO_8601#Local_time_(unqualified)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants