Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#972: Ensure a consistent timezone is used in comparisons
The service code uses DateUtils to convert a long into a String format, which DateUtils converting the long to an instant, then an OffsetDateTime before passing this through a formatter, using the local timezone during the OffsetDateTime conversion. As the test was using a pre-created String based on the UTC timezone, the test does not correctly compare the values when being executed in a different timezone. To overcome this, the test has been altered to use the same DateUtils methods to convert from the long to a String, thereby ensuring the same timezone handling is using in both test and live code.
- Loading branch information