[Sedate] "-00:00" offset vs "Z"

Justin Grant <justingrant.ietf.public@gmail.com> Mon, 21 March 2022 08:48 UTC

Return-Path: <justingrant.ietf.public@gmail.com>
X-Original-To: sedate@ietfa.amsl.com
Delivered-To: sedate@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BB8923A18EF for <sedate@ietfa.amsl.com>; Mon, 21 Mar 2022 01:48:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id umsMxnoz7UCM for <sedate@ietfa.amsl.com>; Mon, 21 Mar 2022 01:48:45 -0700 (PDT)
Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 515DD3A191A for <sedate@ietf.org>; Mon, 21 Mar 2022 01:48:43 -0700 (PDT)
Received: by mail-yb1-xb35.google.com with SMTP id o5so26753948ybe.2 for <sedate@ietf.org>; Mon, 21 Mar 2022 01:48:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=/OloDkbVXrpuLM/rGaRLXibWiRJbGIp2H8owmbBiICA=; b=LvdHVif+plxdyJ1CDsE++NV1Yd77EVKzEhCtR81/02Ssetfr0j0uHDSNbzteILcavo vhmAOgY/mIre78/pyrEp1v8TdbShUDElNOen1WWsCfWAaYS+MPcg1HKPEmE3wQIi0mJ6 lyIVwtl04b1XelvsfkU8igOjtpYePt/DKYPM/8AWJglHqmKkctWE3lqhaKUDxlAZ0NF5 0L+MfPl6laS8qj/M0jNrNuMKErdV2AZmRIkeY14yZ0VENmhDOEe1LC5qqnkLiNI9PDxU FHbmW9wZbigUS/1ALGjZ8KE5t3WHdV+QuhQLUIl7Eh6ESfn61UqC1J+i1PjCte3v7Njj 9njQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/OloDkbVXrpuLM/rGaRLXibWiRJbGIp2H8owmbBiICA=; b=aS4qBbqcbDn4YBu7gQKWWKEvaJRkT1eszjhdQX5QOMIIzf3traRGDUFdbvJi4Mi5Fx Yf9H3bxSICXQmhGoYqrBiB4HLrp2udM72+PYx4ZazBNtkODjpHa8+l6w/IkAPM93qn7f uTFLuxYTjTFPaD3kpymC3yhFK9kVKcKoDQ0nzkZamvEosoUmmU9DGNeFSalmn813F2oY Gs4zd0SSB9BA6G9fnwo/diPuNVWsEvXU0xkShlonqCvM62hRPyZgPiRzQTSp+Cg+2X/q BYqei2ANvbzds9op4Q90dicg/vcaOzZv3ktUvQ/baivgBa4RejCEYK3PH1ub20qst+Fz 0BVw==
X-Gm-Message-State: AOAM5301PCL0gO8RhgClY9quBBpusPJvcMsg0e7bbnxsecYt82y/sggL fXspvrUGAIkKgfyNov5DKhqM4sWd1Pyu2gumToTv27C8HUg=
X-Google-Smtp-Source: ABdhPJxr85kWxFOVgLU+6KpdHq97PBzE/KESW90QraOjkOQRku5lDhU5PG/N138WtmOri/gmunYRxfGx8TeaIXkaTBw=
X-Received: by 2002:a25:4003:0:b0:633:8ab5:b93e with SMTP id n3-20020a254003000000b006338ab5b93emr21497742yba.387.1647852521689; Mon, 21 Mar 2022 01:48:41 -0700 (PDT)
MIME-Version: 1.0
From: Justin Grant <justingrant.ietf.public@gmail.com>
Date: Mon, 21 Mar 2022 01:48:30 -0700
Message-ID: <CACy7CfgVqFFHLT7OF7Lnt+0EmQoAoSLztEbgfZmpn8rfuTuiiw@mail.gmail.com>
To: sedate@ietf.org
Content-Type: multipart/alternative; boundary="0000000000003296f705dab6906c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/sedate/ASuUtP1euUmyaetyv7do6iCfAjo>
Subject: [Sedate] "-00:00" offset vs "Z"
X-BeenThere: sedate@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Serialising Extended Data About Times and Events <sedate.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/sedate>, <mailto:sedate-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/sedate/>
List-Post: <mailto:sedate@ietf.org>
List-Help: <mailto:sedate-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/sedate>, <mailto:sedate-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 21 Mar 2022 08:48:48 -0000

RFC 3339 says that the offset -00:00 should be used when the local offset
is unknown.

4.3 <https://datatracker.ietf.org/doc/html/rfc3339#section-4.3>.
Unknown Local Offset Convention

   If the time in UTC is known, but the offset to local time is unknown,
   this can be represented with an offset of "-00:00".  This differs
   semantically from an offset of "Z" or "+00:00", which imply that UTC
   is the preferred reference point for the specified time.  RFC2822
<https://datatracker.ietf.org/doc/html/rfc2822>
   [IMAIL-UPDATE
<https://datatracker.ietf.org/doc/html/rfc3339#ref-IMAIL-UPDATE>]
describes a similar convention for email.


However, my understanding is that many (most?  almost all?) applications
and libraries ignore the standard's advice and instead use Z, not -00:00,
when the local offset is unknown. For example, java.time.Instant
<https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html> uses Z
even though it does not know the local offset because its data model is
only a single time-since-epoch value. Example:

import java.time.Instant;
class Main {
  public static void main(String[] args) {
    Instant instant = java.time.Instant.parse("2017-06-16T21:25:37.258Z");
    System.out.println(instant.toString());
    // => 2017-06-16T21:25:37.258Z
  }
}

Is my assumption correct that most applications use Z when -00:00 would be
more correct according to the standard?  If so, do you know why -00:00
never became popular?

Cheers,
Justin