-
-
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
behaves differently with no args
#3756
Comments
Could you please replace the screen shot by some text? Thanks |
done. I think this is related to this issue |
I’ll work on this one. Would it be okay for this project to use chrono’s |
I'm pretty sure this can be fixed by just changing |
I don't think it does, this is from after changing to
|
chrono's $ LC_ALL=en_US.UTF-8 cargo run date
Sat 30 Jul 2022 08:48:56 PM -04:00
$ LC_ALL=en_US.UTF-8 date
Sat Jul 30 08:49:01 PM EDT 2022 It's mostly the same, but pure-rust-locales, which chrono uses for |
can we directly call libc ? I have a fix if unsafe code is allowed but obviously it's not ideal |
@rayan-mazouz |
@tertsdiepraam great thanks, my fix works for linux, I'll try to make it work on mac, windows and redox, then do a merge request |
I wonder if we can start using icu4x for this. Specifically the |
@rayan-mazouz is your fix for linux available on some branch? I'd like to investigate this issue. |
sorry, it is not. |
There seems to be a workaround to get locale. I have raised a PR with the above fix: #5164 |
Improve the display of dates formatted with the `%Z` specifier so that the timezone abbreviation is displayed, not just its numeric offset. Fixes uutils#3756 Co-authored-by: Jeffrey Finkelstein <jeffrey.finkelstein@protonmail.com>
Improve the display of dates formatted with the `%Z` specifier so that the timezone abbreviation is displayed, not just its numeric offset. Fixes uutils#3756 Co-authored-by: Jeffrey Finkelstein <jeffrey.finkelstein@protonmail.com>
date
behaves differently than coreutils when no argument is passed, if the goal of the project is to behave a 100% like the gnu coreutils, this should be fixed. here are two examples , it should be pretty easy to reproduce unless it's a weird problem with both my systems (manjaro and endeavour os)Exemple 1 :
$./date
Fri Jul 29 09:09:10 2022
$date
$Fri 29 Jul 2022 09:09:12 CEST
Exemple 2 :
$./date
Fri Jul 29 16:40:39 2022
$date
$Fri Jul 29 04:40:40 PM CDT 2022
I looked at the code and i think it's caused by the chrono dependency not correctly detecting the current locale when formatting with %c. not sure about that though.
The text was updated successfully, but these errors were encountered: