GNU bug report logs - #71986
RFC: date @ to support ms.

Previous Next

Package: coreutils;

Reported by: Richard Neill <rn214 <at> cam.ac.uk>

Date: Mon, 8 Jul 2024 03:17:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 71986 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Richard Neill <rn214 <at> cam.ac.uk>, Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 71986 <at> debbugs.gnu.org
Subject: Re: bug#71986: RFC: date @ to support ms.
Date: Tue, 9 Jul 2024 02:52:08 +0200
On 7/8/24 21:18, Richard Neill wrote:
> Also, this is an increasingly common format to see as an input

In shell apps? News to me. I thought it was more of a Java and/or 
JavaScript thing. Those languages love ms. POSIX, though, prefers ns.

For occasional use one can just use the shell, with no new option 
needed. For your example:

$ ms=1720378861258
$ date -d@${ms%???}
Sun Jul  7 21:01:01 CEST 2024

But really, it's better to use a decimal point, as Andreas suggested. 
Simple, clear, unambiguous, and no new option needed regardless of 
whether the timestamps have ms or μs or ns resolution.


> for date-input, this:
>    date --date '1/2/2024'
> is ambiguous

It's ambiguous without context, yes, but the manual documents it so that 
provides the context.

https://www.gnu.org/software/coreutils/manual/html_node/Calendar-date-items.html

In GNU projects man pages are typically just quick summaries: for the 
details you need the manual.




This bug report was last modified 1 year and 9 days ago.

Previous Next


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