GNU bug report logs -
#63119
date -Ins has a comma!!
Previous Next
To reply to this bug, email your comments to 63119 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#63119
; Package
coreutils
.
(Thu, 27 Apr 2023 15:04:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
aaa jjj <ajneu1 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 27 Apr 2023 15:04:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
is it not a bug, that if I do
LC_ALL=C date -u -Ins
gives me this:
2023-04-27T13:30:15,976772648+00:00
I'm talking about the comma. What is it doing there???
Should this not be a dot instead?
Here's the code:
https://github.com/coreutils/coreutils/blob/35adc746a000ac1f8d1d817a6a3a60d5b80daef5/src/date.c#L465
What does ISO 8601 say about this?
Look at other languages:
node -e 'console.log(new Date().toISOString())'
-> 2023-04-27T13:40:58.846Z
python3 -c 'from datetime import datetime;
print(datetime.now().isoformat())'
-> 2023-04-27T16:23:40.217313
python3 -c 'from datetime import datetime, timezone;
print(datetime.now(timezone.utc).isoformat())'
-> 2023-04-27T14:23:40.228151+00:00
python3 -c 'from datetime import datetime, timezone;
print(datetime.now(timezone.utc).astimezone().isoformat())'
-> 2023-04-27T16:23:40.238908+02:00
PS:
Hell, you cannot simply change it now (backwards-compatibility), but what
about another option flag or whatever...
Thanks.
A
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#63119
; Package
coreutils
.
(Thu, 27 Apr 2023 18:47:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 63119 <at> debbugs.gnu.org (full text, mbox):
On 4/27/23 07:53, aaa jjj wrote:
> What does ISO 8601 say about this?
I believe ISO 8601-1:2019/Amd 1:2022 prefers a comma, though a period is
allowed. Unfortunately I can't easily check this because the standards
are not published online and you need to pay to read them. Isn't ISO
wonderful?
This bug report was last modified 1 year and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.