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

dzone.009.clit test fails after 2021-06-28 #121

Closed
bmwiedemann opened this issue Jan 5, 2021 · 11 comments
Closed

dzone.009.clit test fails after 2021-06-28 #121

bmwiedemann opened this issue Jan 5, 2021 · 11 comments

Comments

@bmwiedemann
Copy link
Contributor

While working on reproducible builds for openSUSE, I found that
our dateutil 0.4.7 package tests fail soon:

FAIL: dzone.009.clit

$ dzone --prev UTC
--- "expected output  7c513e5a" 2036-02-07 16:46:30.463883626 +0000
+++ "actual output  7c513e5a"   2036-02-07 16:46:30.463883626 +0000
@@ -1 +1 @@
-never <- never UTC
+never <- 2021-06-28T00:00:27+00:00     UTC
$? 1

Why would it think that a DST change happened in the UTC zone? I tried dzone --next UTC and it said never

Interestingly, it was still passing in 2020-04-24 with the same 0.4.7
Bisected a bit and it seems, timezone-2019c was still good but timezone-2020a already makes it fail.

@bmwiedemann
Copy link
Contributor Author

bmwiedemann commented Jan 5, 2021

Debugged further and found that tests work again after reverting this timezone change eggert/tz@fb43418

Add support for Expires lines to zic
zic now supports expiration dates for leap second lists.

To reproduce:

faketime 2021-06-29 dzone --prev UTC

@MeggyCal
Copy link

MeggyCal commented Jan 18, 2021

The problem part is:

--- timezone-2020f.orig/zic.c
+++ timezone-2020f/zic.c
@@ -3038,8 +3038,6 @@ adjleap(void)
            error(_("last Leap time does not precede Expires time"));
            exit(EXIT_FAILURE);
          }
-         if (leapexpires <= hi_time)
-           hi_time = leapexpires - 1;
        }
 }

probably along with the not ignoring of #expires 1624838400 (2021-06-28 00:00:00 UTC) line in leapseconds. The date comes from leap-seconds.list, which always contained its expiration date.

Is it possible to fix on your side, please? Or should I contact tz upstream?

@hroptatyr
Copy link
Owner

Hi Bernhard, hi MeggyCal,
I'm trying to reproduce this somehow using Ubuntu's tzdata 2020f, or eggert/tz's git repo, well, to no avail.

$ ll /usr/share/zoneinfo/right/Etc/UTC
2021-01-18T13:33:07 -rw-r--r-- 1 freundt users 658 2021-01-08T16:19:33 /usr/share/zoneinfo/right/Etc/UTC
$ sha1sum /usr/share/zoneinfo/right/Etc/UTC
40af28cda3670008fbb91602b2f23982a46ad9d0  /usr/share/zoneinfo/right/Etc/UTC

same as ever, and obviously no error. Can you point me to something I can download and unpack, an rpm or something maybe?

@bmwiedemann
Copy link
Contributor Author

bmwiedemann commented Jan 18, 2021

I see it with http://download.opensuse.org/distribution/leap/15.2/repo/oss/x86_64/timezone-2020a-lp152.2.1.x86_64.rpm but maybe there are other contributing factors.

On the openSUSE side we track this in http://bugzilla.opensuse.org/show_bug.cgi?id=1180797

For some reason, it does not fail on Debian with the same versions.

@hroptatyr
Copy link
Owner

I see. SuSE generates zones with bloat=slim (-b slim as argument to zic). I think I have to redo the tz parser, I'm currently expecting -b fat files.

@MeggyCal
Copy link

-b slim is not the problem, the behaviour is reproducible also with -b fat (for example with this package: https://build.opensuse.org/package/binaries/openSUSE:Factory/timezone/standard). Leap 15.2 should have the "fat" timezone version already, please update.

@hroptatyr
Copy link
Owner

Using timezone-2020f-1.1.x86_64.rpm instead of the system one, the checks pass completely. And yes, they are in fat format.

@bmwiedemann
Copy link
Contributor Author

Using timezone-2020f-1.1.x86_64.rpm instead of the system one, the checks pass completely. And yes, they are in fat format.

I can reproduce it with Factory's timezone-2020f-1.1
Did you really run checks under faketime 2021-06-29 ?

@hroptatyr
Copy link
Owner

No, that's right. I can reproduce it now (with 2020f-1.1), too, using faketime. I mean, earlier, with -b slim zones, I was able to reproduce it even without faketime.

hroptatyr added a commit that referenced this issue Jan 20, 2021
* bug/121:
  use coordinated zone without leap transitions by default, fixes issue #121
  turn tzraw into standalone program for inspection
hroptatyr added a commit that referenced this issue Feb 2, 2021
* master: (45 commits)
  major, make ymcw dates ending in -00 synonymous with n-th ISO week in that month, use -07 for Sunday
  minor, properly convert negative stamps to hms
  minor, read epochs with strtoi64()
  minor, handle coordinated zones internally
  hygiene, use 48 bits for STAMP_MIN/STAMP_MAX
  minor, disallow transitions to the same type
  hygiene, operate with STAMP_MIN and STAMP_MAX for stamp_t slots
  debug, output test suite log in case of error
  fix, work around gcc antics
  minor, redo tzif reader, support files zic'd with -b slim
  use coordinated zone without leap transitions by default, fixes issue #121
  turn tzraw into standalone program for inspection
  docs: requested change, incomparable -> non-comparable
  docs: fix simple typo, uncomparable -> incomparable
  chore, make distcheck target non-parallel
  fix, track negativity in precalc to allow -0, fixes issue #116
  test, provide regression test case
  fix, also keep sandwich state when adding nanoseconds to dates, fixes #114
  fix, disallow business-day-of-year calendars, fixes issue #113
  hygiene, convince coverity that a certain path in __close() is impossible to walk into
  ...
@bmwiedemann
Copy link
Contributor Author

I tested that 2fd9682 fixed this.

@MeggyCal
Copy link

Perfect! Thanks a lot to all.

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

3 participants