GNU bug report logs - #58599
`date -d $(date)` error for non en_* locale

Previous Next

Package: coreutils;

Reported by: Ruslan Kovtun <koutoftimer <at> gmail.com>

Date: Mon, 17 Oct 2022 23:04:03 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Ruslan Kovtun <koutoftimer <at> gmail.com>, 58599 <at> debbugs.gnu.org
Subject: bug#58599: `date -d $(date)` error for non en_* locale
Date: Mon, 17 Oct 2022 18:04:04 -0700
On 10/17/22 07:44, Ruslan Kovtun wrote:
> According to "do one thing and do it well" and to the fact of '-d/--date'
> option existence, `date` should be able to parse its default output in any
> locale.

Patches would be welcome. Good luck getting it to work, though. Many 
date formats are ambiguous, and I don't see how you'd address that.

In the meantime, I suggest sticking to ISO format dates and times with 
UTC, e.g.:

date -d "$(date -u +'%Y-%m-%d %H:%M:%S.%NZ')"




This bug report was last modified 2 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.