-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
date: fails to parse +N and -N in absolute time string as a time zone #7065
Comments
Making some tests, the code can sucessfully parse the strings |
Maybe the |
Inspecting the code, I see that they try to parse also the timezone, but since %z accepts only 4 digits (i.e +0000) or 4 digits separated by |
I'm proposing adding support for this to |
Apparently my pull request uutils/parse_datetime#101 was not sufficient, I'll keep investigating. |
Pull request uutils/parse_datetime#102 should have provided a basic implementation of this feature, and I expected it to become available in the just released version of For example, after use parse_datetime::parse_datetime;
fn main() {
dbg!(parse_datetime("1997-01-19 08:17:48 +0").unwrap());
} when executed with
|
i just tagged the release + cargo publish |
Hmm is it possible the tag is on the wrong commit? This is the log from the
|
nope, it just misses you can see the code of the lib here: |
I checked in
should be in Edit: nevermind, that's what you said 🙈 . |
Ignore my previous comment. What I meant to write was this: I checked in
should be in |
Environment: Ubuntu 20.04, uutils main branch (git commit 88cdf16), GNU coreutils v8.30
Steps to reproduce:
What happens now: uutils
date
terminates with an error because it doesn't understand the+0
time zone:If you remove the
+0
, then uutilsdate
does successfully parse the date string.What I expected to happen: GNU
date
successfully interprets the+0
as a time zone:Notes: this is causing a test failure in GNU test file
tests/date/date.pl
.The text was updated successfully, but these errors were encountered: