From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 27 11:03:40 2023 Received: (at submit) by debbugs.gnu.org; 27 Apr 2023 15:03:40 +0000 Received: from localhost ([127.0.0.1]:59552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ps39o-0000X6-5z for submit@debbugs.gnu.org; Thu, 27 Apr 2023 11:03:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:41772) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ps30c-0000Bt-3q for submit@debbugs.gnu.org; Thu, 27 Apr 2023 10:54:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ps30Z-0002pl-SO for bug-coreutils@gnu.org; Thu, 27 Apr 2023 10:54:08 -0400 Received: from mail-yw1-x1143.google.com ([2607:f8b0:4864:20::1143]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ps30Y-0000QX-6P for bug-coreutils@gnu.org; Thu, 27 Apr 2023 10:54:07 -0400 Received: by mail-yw1-x1143.google.com with SMTP id 00721157ae682-54f8e823e47so98226877b3.2 for ; Thu, 27 Apr 2023 07:54:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682607244; x=1685199244; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=igkMGIyVS5zZHiNS6MbQ7GqoVywDfqb1fi44jLLIFyY=; b=CyXkOzuL3Gd2qewQLjH//wZuimP4VWQQY1tH7fL8jgSLlD/Qc7Fr5yKreJXAMSIedK 7UKkLeVsDZ27BjU32lb4kzG8RLjE/lZHlSzOov9HIyS+X0JOjpT0vlQ6V9Wd5EsaEP3g Qbi4Jo9IeBGKMDS8NkDMdYaG/Ie7f7DhrSGqdQD/V0sRATScC36NqE4VIVOE3d4QlIFH VefhsyD8TPy+R31PLEF4rew6/ZUHqpyceZrC5M1EDyd5vfKcrN/N8hZjwI5PbFZBYHCt TLEg/eG7onrmFQgjRPkcHJoHbqETtYx/ch+cU2uW/rQwpQG55fgUBx99p/dh+q3Tj1si K21g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682607244; x=1685199244; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=igkMGIyVS5zZHiNS6MbQ7GqoVywDfqb1fi44jLLIFyY=; b=kJogT3nCrIQMeCGSEun0n3csxXHcdb+rRDX/MM9r5laU/MmxMOhxeUb4Oe7LgbOBvN UqMCNI5wfN+hLilSEcdKuiXFxPK18QWhX9Sk9XajpqdwwOvOXJY6Z/L5P7BMz47PRIHU 7pbymctJYu3V3hn7fnByQi3NUWCdVGaRiVYePrpN2SXTyhACrFAXsMI5O8Srm3IUKYKO ulIoEWxdSv+wX7Kbj0bVfWFgIwTbecFz28Ere+UOZpXr8HTBxLbEoiRkzIcJKBm0Hxah cwQGA5ja5AcWnzfsGAWG9+H67Qb4eGheGn6/AHCNW6yyaW7kAgLUbk8dat9fQ8XScMts VI1Q== X-Gm-Message-State: AC+VfDy+7o6rQr0AUKgprbCPLjGTHlI3Ka3q14ws9vJS5ZduygCHl2uW z1rQgNlz5ulOUo3j/dD2EacDfwapsX7177oeb4feFHv3j43C1xYT X-Google-Smtp-Source: ACHHUZ78UjOMzpRqlR8C3Xr0agzMfHPYI8FzSE5e5K9yhGzTJKVx+VSw62wXk/BfFVjvYS2z/hXEC4JGHmoQlPxVgIM= X-Received: by 2002:a81:a105:0:b0:550:9d9f:5fb6 with SMTP id y5-20020a81a105000000b005509d9f5fb6mr1506746ywg.1.1682607244228; Thu, 27 Apr 2023 07:54:04 -0700 (PDT) MIME-Version: 1.0 From: aaa jjj Date: Thu, 27 Apr 2023 16:53:53 +0200 Message-ID: Subject: date -Ins has a comma!! To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary="00000000000016bb2d05fa5287b6" Received-SPF: pass client-ip=2607:f8b0:4864:20::1143; envelope-from=ajneu1@gmail.com; helo=mail-yw1-x1143.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 27 Apr 2023 11:03:38 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --00000000000016bb2d05fa5287b6 Content-Type: text/plain; charset="UTF-8" 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 --00000000000016bb2d05fa5287b6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

is it not a bug, that if I do=C2=A0=

LC_ALL=3DC date -u -Ins

= gives me this:
2023-04-27T13:30:15,976772648+00:00
=
I'm talking about=C2=A0the comma. What is it doing there= ???
Should this not be a dot instead?

He= re's the code:

What= does ISO 8601 say about this?

Look at other langu= ages:

node -e 'console.log(new Date().toISOStr= ing())'
-> 2023-04-27T13:40:58.846Z

=
python3 -c 'from datetime import datetime; print(datetime.no= w().isoformat())'
->=C2=A02023-04-27T16:23:40.217313
python3 -c 'from datetime import datetime, timezone; print= (datetime.now(timezone.utc).isoformat())'
->=C2=A02023-04-27T14:2= 3:40.228151+00:00

python3 -c 'from datetime im= port datetime, timezone; print(datetime.now(timezone.utc).astimezone().isof= ormat())'
->=C2=A02023-04-27T16:23:40.238908+02:00

=

PS:
Hell, you cannot simply change it n= ow (backwards-compatibility), but what about another option flag or whateve= r...


Thanks.=C2=A0
A

--00000000000016bb2d05fa5287b6-- From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 27 14:46:44 2023 Received: (at 63119) by debbugs.gnu.org; 27 Apr 2023 18:46:44 +0000 Received: from localhost ([127.0.0.1]:59814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ps6dg-0000qf-01 for submit@debbugs.gnu.org; Thu, 27 Apr 2023 14:46:44 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:45746) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ps6dd-0000qO-Qr for 63119@debbugs.gnu.org; Thu, 27 Apr 2023 14:46:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 91F7F3C097AFA; Thu, 27 Apr 2023 11:46:35 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id l636J2AhxY2o; Thu, 27 Apr 2023 11:46:35 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 49A5E3C097AFF; Thu, 27 Apr 2023 11:46:35 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 49A5E3C097AFF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1682621195; bh=k4aeJbVIsteJbtCT8t0dNBp5PQ7CHOTGb8qP2T5pjUc=; h=Message-ID:Date:MIME-Version:To:From; b=iaCTnGABRLDPFIwAX8PJ1Uo3PzOYKpOi9M+mUtV/VjcxxJNf+2T5sOrMVuSfcMctr ppE5D3gwzei58MUu67Anow/3ujUlWr0x5cdqfhvec0G1estaE4geOqVwGbzs4C+jnF dHTPX6tGGqCjfonF+42viJHA0arnvBxiPMDQ5f9O2WwQ4bR1c7dk57tGSyQFM9Z936 3JMmsIjLjzjHGtoOD0Wh3Y2/NijRwsxlc4c8wIMtkL1634BMqP7u/QhO2Nx/CYduep 6khZDW7AjSBCHFUtIRll6npsMjHkifVUqkjukC6uqCWSysDb4VfxolZ4ciHit80BJK YOqNiTTGsBWCQ== X-Virus-Scanned: amavisd-new at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9Vh63xPMM0Tk; Thu, 27 Apr 2023 11:46:35 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 34A973C097AFA; Thu, 27 Apr 2023 11:46:35 -0700 (PDT) Message-ID: <5e162eee-af71-9d35-a501-bbeb7606a7c8@cs.ucla.edu> Date: Thu, 27 Apr 2023 11:46:34 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: bug#63119: date -Ins has a comma!! Content-Language: en-US To: aaa jjj , 63119@debbugs.gnu.org References: From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: 63119 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) 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?