Skip to content

Parsing failure for date time with timezone name #124

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

Open
jfinkels opened this issue Feb 22, 2025 · 2 comments
Open

Parsing failure for date time with timezone name #124

jfinkels opened this issue Feb 22, 2025 · 2 comments

Comments

@jfinkels
Copy link
Contributor

parse_datetime fails to parse "1997-01-01 00:00:00 UTC"

@drinkcat
Copy link

drinkcat commented May 8, 2025

I think fixing this properly (and easily) will require switching to jiff, partly because, with chrono, it's very tricky to include (or not) a full timezone database depending on the OS (see #7849 for some of the struggle).

@bdrung
Copy link

bdrung commented May 16, 2025

I ran into this bug when installing tzdata using rust-coreutils on Ubuntu. The tzdata postinst uses following code:

 UTdate=$(LC_ALL=C TZ=UTC0 date)
 TZdate=$(unset TZ ; LANG=C date -d "$UTdate")

That works with coreutils, but fails with rust-coreutils:

$ LANG=C coreutils date -d "Tue May 13 11:50:05 UTC 2025"
date: invalid date 'Tue May 13 11:50:05 UTC 2025'

Ubuntu-Bug: https://bugs.launchpad.net/ubuntu/+source/tzdata/+bug/2110537

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