Closed jleben closed 6 years ago
@jleben Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
@jleben Thank you for signing the Contributor License Agreement!
The existing algorithm checks whether the day of the previous time is less than the day of the current time, when the two times are converted to UTC.
This is problematic in two ways:
This commit fixes the above problems.
This commit also adds new tests which verify that the problems described above are fixed.
Moreover, the tests are fixed by interpreting test times in the year 2018 instead of the year 0. Without this some tests would fail falsely, because they expect present time to be in the range when the range is interpreted at the given location in 2018, but that is not the case when it is interpreted at the given location in the year 0.