-
-
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 -d"@1690466034"
isn't supported
#5177
Comments
date -d"@1690466034"
isn't supportdate -d"@1690466034"
isn't supported
Just to point people in the right direction: this should probably be fixed in |
@sylvestre @tertsdiepraam I would like to work on this. |
After some investigation, i think "@" is just the number of seconds and the GNU date uses parse-datetime https://github.com/coreutils/gnulib/blob/master/lib/parse-datetime.y#L597 |
@philolo1, I'm debugging here as well. |
@BFostek @tertsdiepraam @sylvestre |
This resolved issue uutils#5177. The PR adds a new enum HumanDuration(Duration), HumanDateTime(DateTime<FixedOffset>) and uses parse_datetime::parse_datetime::from_str to support datetime if relative time cannot be parsed. Furthermore tests are added for tests/by-util/test_date.rs.
@BFostek @tertsdiepraam @sylvestre I just did a pull request. I think there are some other improvements that could be made, but i would prefer to do it in a different pr. For example my ubunto gnu also support negative unix timestamps like "@-2". Would it be appropiate to create a new issue for this? |
This resolved issue uutils#5177. The PR adds a new enum HumanDuration(Duration), HumanDateTime(DateTime<FixedOffset>) and uses parse_datetime::parse_datetime::from_str to support datetime if relative time cannot be parsed. Furthermore tests are added for tests/by-util/test_date.rs.
This resolved issue uutils#5177. The PR adds a new enum HumanDuration(Duration), HumanDateTime(DateTime<FixedOffset>) and uses parse_datetime::parse_datetime::from_str to support datetime if relative time cannot be parsed. Furthermore tests are added for tests/by-util/test_date.rs.
This resolved issue uutils#5177. The PR adds a new enum HumanDuration(Duration), HumanDateTime(DateTime<FixedOffset>) and uses parse_datetime::parse_datetime::from_str to support datetime if relative time cannot be parsed. Furthermore tests are added for tests/by-util/test_date.rs.
This resolved issue uutils#5177. The PR adds a new enum HumanDuration(Duration), HumanDateTime(DateTime<FixedOffset>) and uses parse_datetime::parse_datetime::from_str to support datetime if relative time cannot be parsed. Furthermore tests are added for tests/by-util/test_date.rs.
This resolved issue uutils#5177. The PR adds a new enum HumanDuration(Duration), HumanDateTime(DateTime<FixedOffset>) and uses parse_datetime::parse_datetime::from_str to support datetime if relative time cannot be parsed. Furthermore tests are added for tests/by-util/test_date.rs.
It is not an invalid date already, but it is not the same yet $ LANG=C /usr/bin/date -d"@1690466034"
Thu Jul 27 13:53:54 UTC 2023
$ coreutils date -d"@1690466034"
Thu Jul 27 13:53:54 2023 |
Currently date until doesn't print Time zone abbreviations. It should be fixed once this PR is merged #5164. |
@sylvestre I believe this issue has been fixed (probably by the work done by @philolo1 on parse_datetime?):
|
with GNU:
with our:
The text was updated successfully, but these errors were encountered: