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

Leap second data in tzdata ‘right’ timezones considered invalid by coreutils and Chrony #35715

Closed
dpk opened this issue Feb 20, 2022 · 8 comments
Labels

Comments

@dpk
Copy link

dpk commented Feb 20, 2022

System

  • xuname:
    Void 5.10.92_1 aarch64-musl Unknown uptodate rF
  • package:
    tzdata-2021e_1
    coreutils-8.32_4
    chrony-4.2_1

Expected behavior

$ TZ=right/UTC date -d 'Dec 31 2008 23:59:60'
Wed Dec 31 23:59:60 UTC 2008

(Test case from the chrony man page)

Actual behavior

date: invalid date ‘Dec 31 2008 23:59:60’

This causes Chrony to reject the leapsectz right/UTC configuration directive, thus CLOCK_TAI on Void is always = UTC, at least when using Chrony. Presumably NTPd also doesn’t know where to get leap second data from, because there doesn’t seem to be any in Void.

The /usr/share/zoneinfo/leapseconds file I’ve seen on other systems is also missing, which could be related.

@dkwo
Copy link
Contributor

dkwo commented Feb 21, 2022

We have
install -m444 -t ${DESTDIR}/usr/share/zoneinfo iso3166.tab zone1970.tab zone.tab
while e.g. Arch has
install -m644 -t "${pkgdir}"/usr/share/zoneinfo iso3166.tab leap-seconds.list zone1970.tab zone.tab SECURITY # zone.tab is depricated and will go soon
Have you tried building with the latter? in particular, adding leap-seconds.list?

@dpk
Copy link
Author

dpk commented Feb 22, 2022

Hmm, curious. Indeed, sha1sum confirms the actual binary data files /usr/share/zoneinfo/right/UTC are identical on Arch and on Void, both with the 2021e release of the tz database. However, putting leap-seconds.list in place does not make a difference: date still does not like the date containing a leap second when its TZ is set to right/UTC

@dpk dpk changed the title tzdata ‘right’ timezones aren’t right Leap second data in tzdata ‘right’ timezones considered invalid by coreutils and Chrony Feb 22, 2022
@dpk
Copy link
Author

dpk commented Feb 22, 2022

I’ve updated the report to reflect the actual symptoms, which seemingly don’t have the cause I thought they did

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Jun 25, 2022
@dkwo
Copy link
Contributor

dkwo commented Jun 25, 2022 via email

@github-actions github-actions bot removed the Stale label Jun 26, 2022
@paper42
Copy link
Member

paper42 commented Jun 29, 2022

@sgn

@sgn
Copy link
Member

sgn commented Jun 29, 2022

This is not a bug of tzutils or tzdata.
It's different in implementation of libc.
On a glibc system:

$ TZ=right/UTC date -d 'Dec 31 2008 23:59:60'
Wed Dec 31 11:59:60 PM UTC 2008

On a musl system:

$ date --debug -d 'Dec 31 2008 23:59:60'
date: parsed date part: (Y-M-D) 2022-12-31
date: parsed number part: year: 2008
date: parsed time part: 23:59:60
date: input timezone: TZ="right/UTC" environment value
date: using specified time as starting value: '23:59:60'
date: error: invalid date/time value:
date:     user provided time: '(Y-M-D) 2008-12-31 23:59:60'
date:        normalized time: '(Y-M-D) 2009-01-01 00:00:00'
date:                                  ---- -- -- -- -- --
date:      possible reasons:
date:        invalid day/month combination;
date:        numeric values overflow;
date:        missing timezone
date: invalid date ‘Dec 31 2008 23:59:60’

IOW, this is the musl specific behavior.

@github-actions
Copy link

Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.

@github-actions github-actions bot added the Stale label Sep 28, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants