Skip to content

date behaves differently with no args #3756

@rayan-mazouz

Description

@rayan-mazouz

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 :

image
$./date
Fri Jul 29 09:09:10 2022
$date
$Fri 29 Jul 2022 09:09:12 CEST


Exemple 2 :

image
$./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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions