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

Tests fail in some timezones #41

Open
vrusinov opened this issue Jul 7, 2021 · 0 comments
Open

Tests fail in some timezones #41

vrusinov opened this issue Jul 7, 2021 · 0 comments

Comments

@vrusinov
Copy link
Contributor

vrusinov commented Jul 7, 2021

$ date                                            
Wed Jul  7 22:18:59 2021

# ^^^ summer time

$ TZ="Europe/Dublin" ./run_all
Passed:                          8283
Failed:                            54
Unexpected successes:               0
Skipped:                            1
Expected failures:                  0
Runtime:                         0.30 seconds

Seems like some actual values about an hour off:

$ make test
<...>
ok 3152 - eoq > now
actual (first - relative:true): 20210731T230000Z now: 20210707T211751Z
ok 3153 - 1st not in same month as now
ok 3154 - 1st day is 1
actual (second - relative:true): 20210801T230000Z now: 20210707T211751Z
ok 3155 - 2nd not in same month as now
ok 3156 - 2nd day is 2
actual (third - relative:true): 20210802T230000Z now: 20210707T211751Z
ok 3157 - 3rd not in same month as now
ok 3158 - 3rd day is 3
actual (fourth - relative:true): 20210803T230000Z now: 20210707T211751Z
ok 3159 - 4th not in same month as now
ok 3160 - 4th day is 4
actual (first - relative:false): 20210630T230000Z now: 20210707T211751Z
ok 3161 - 1st in same month as now
ok 3162 - 1st day is 1
actual (second - relative:false): 20210701T230000Z now: 20210707T211751Z
ok 3163 - 2nd in same month as now
ok 3164 - 2nd day is 2
actual (third - relative:false): 20210702T230000Z now: 20210707T211751Z
ok 3165 - 3rd in same month as now
ok 3166 - 3rd day is 3
actual (fourth - relative:false): 20210703T230000Z now: 20210707T211751Z
ok 3167 - 4th in same month as now
<...>

However:

$ TZ="UTC" ./run_all
Passed:                          8337
Failed:                             0
Unexpected successes:               0
Skipped:                            1
Expected failures:                  0
Runtime:                         0.30 seconds
$ TZ="America/Los_Angeles" ./run_all
Passed:                          8337
Failed:                             0
Unexpected successes:               0
Skipped:                            1
Expected failures:                  0
Runtime:                         0.30 seconds

I didn't dig any further.

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

No branches or pull requests

1 participant