-
Notifications
You must be signed in to change notification settings - Fork 384
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
test_date_ymwdhMs fails because of summer time #1214
Comments
I've done some more experiments and yeah, the reason is because glib is smarter than the tests when it comes to DST.
Produces the output:
|
The same problem problem on Fedora 27 with latest updates and mu v1.0 and mu master repos. |
Ah, good catch! I've fixed it. |
Expected or desired behavior
All the tests should succeed.
Actual behavior
The test_date_ymwdhMs in the test-utils.cc file fails like:
Notice the the time difference is 1 h (3600 s). I attribute the problem to the fact that the date function uses the local time (taking into consideration summer time) but the expected diff does not (only does basic arithmetic such as 2 * 7 * 24 * 60 * 60).
I'm not sure of a good solution: should we bump the tolerance up to 3600 s, or should we set the date of the tests to some time where there are no summer time effects, or... ?
This was discovered by attempting to build mu with Guix (https://www.gnu.org/guix/).
Thank you!
Steps to reproduce
Build the latest stable release and run the tests.
Versions of mu, mu4e/emacs, operating system etc.
Guix at commit 4bd2e2a5b04a52e2ebccb23e782efd53199e8af6 (mu 1.0, glib 2.54.2, etc.)
The text was updated successfully, but these errors were encountered: