coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

date --date does not support strings like "Jul 18 06:14:49 2024 GMT"

Open joergdw opened this issue 1 year ago • 3 comments

Dear maintainers,

unlike coreutils from the GNU project, date can not deal with the following situation:

date --date "Jul 18 06:14:49 2024 GMT" +%s
#> date: invalid date 'Jul 18 06:14:49 2024 GMT'

Can you please add support for time strings in that format?

joergdw avatar Aug 13 '24 12:08 joergdw

Perhaps this is related to https://github.com/uutils/coreutils/issues/2685.

joergdw avatar Aug 13 '24 12:08 joergdw

I'm working on this in https://github.com/uutils/coreutils/pull/6667

dhilst avatar Aug 25 '24 15:08 dhilst

The parsing now lives in https://github.com/uutils/parse_datetime so that's where this would need to be fixed

jfinkels avatar Feb 22 '25 04:02 jfinkels

This issue has been fixed in the meantime. On main:

$ cargo run -q date --date "Jul 18 06:14:49 2024 GMT" +%s
1721283289

Thanks for reporting!

cakebaker avatar Aug 03 '25 14:08 cakebaker