Describe the bug
There are many valid forms of the same ISO_8601 time:
2015-03-01T01:00:00.000Z
2015-03-01T01:00:00,000Z (ISO 8601:2004 has a preference for a comma decimal separator)
2015-03-01T01:00:00Z
2015-03-01T02:00:00-01:00
are all the same time. However, since the tests currently check times using string compares, only the first is accepted.
Instead of using string compare, the test should use ZonedDateTime to parse and compare the times.
To Reproduce
Test using any implementation that does not give back the time using the exact same formatting:
java.lang.AssertionError: The resultTime of the Observation 33 should have been "2015-03-01T01:00:00.000Z" but it is now "2015-03-01T01:00:00Z". expected <br>[2015-03-01T01:00:00.000Z] but found <br>[2015-03-01T01:00:00Z]
Expected behavior
Times are compared as times, not Strings. Alternative formatting of the time is accepted.
Describe the bug There are many valid forms of the same ISO_8601 time: 2015-03-01T01:00:00.000Z 2015-03-01T01:00:00,000Z (ISO 8601:2004 has a preference for a comma decimal separator) 2015-03-01T01:00:00Z 2015-03-01T02:00:00-01:00 are all the same time. However, since the tests currently check times using string compares, only the first is accepted. Instead of using string compare, the test should use ZonedDateTime to parse and compare the times.
To Reproduce Test using any implementation that does not give back the time using the exact same formatting:
java.lang.AssertionError: The resultTime of the Observation 33 should have been "2015-03-01T01:00:00.000Z" but it is now "2015-03-01T01:00:00Z". expected <br>[2015-03-01T01:00:00.000Z] but found <br>[2015-03-01T01:00:00Z]
Expected behavior Times are compared as times, not Strings. Alternative formatting of the time is accepted.