From unknown Tue Jun 17 01:44:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21902: doc incorrectly describes Julian Date Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 13 Nov 2015 12:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21902 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 21902@debbugs.gnu.org X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14474195231376 (code B ref -1); Fri, 13 Nov 2015 12:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Nov 2015 12:58:43 +0000 Received: from localhost ([127.0.0.1]:36715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxDwA-0000M7-CD for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxDvp-0000LZ-Hq for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxDvn-0003Ru-Ve for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxDvn-0003Rq-Sd for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxDvm-0000PS-Ro for bug-guile@gnu.org; Fri, 13 Nov 2015 07:58:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxDvl-0003Rd-N1 for bug-guile@gnu.org; Fri, 13 Nov 2015 07:58:18 -0500 Received: from river6.fysh.org ([2001:41d0:d:20da::2]:35918 helo=river.fysh.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxDvl-0003RW-Fo for bug-guile@gnu.org; Fri, 13 Nov 2015 07:58:17 -0500 Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1ZxDvh-00075y-6y; Fri, 13 Nov 2015 12:58:13 +0000 Date: Fri, 13 Nov 2015 12:58:13 +0000 From: Zefram Message-ID: <20151113125813.GM13455@fysh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) The manual says, in the section "SRFI-19 Introduction", # Also, for those not familiar with the terminology, a "Julian Day" is # a real number which is a count of days and fraction of a day, in UTC, # starting from -4713-01-01T12:00:00Z, ie. midday Monday 1 Jan 4713 B.C. There are two errors in the first statement of the epoch for Julian Date, in ISO 8601 format. The JD epoch is noon on 1 January 4713 BC *in the proleptic Julian calendar*. The ISO 8601 format is properly never used on the Julian calendar: ISO 8601 specifies the use of the Gregorian calendar, including proleptically where necessary (as it most certainly is here). On the proleptic Gregorian calendar, the JD epoch is noon on 24 November 4714 BC, and so the ISO 8601 expression should have some "-11-24". The second error is in how the year is expressed in ISO 8601. The initial "-" does not mean the BC era, it means that the year number is negative. ISO 8601 specifies that the AD era is always used, with year numbers going negative where necessary; this arrangement is commonly known as "astronomical year numbering". So "0000" means 1 BC, "-0001" means 2 BC, and "-4713" means 4714 BC. So the "-4713" is not correct for the attempted expression of the Julian calendar date, but happens to be correct for the Gregorian calendar date. Putting it together, a correct ISO 8601 expression for the Julian Date epoch is "-4713-11-24T12:00:00Z". The word-based statement of the JD epoch is correct as far as it goes, but would benefit considerably by the addition of a clause stating that it is in the proleptic Julian calendar. (Generally, a clarification of which calendar is being used is helpful with the statement of any date prior to the UK's switch of calendar in 1752.) The description of Modified Julian Date is essentially correct. However, there's a third problem: misuse of the term "UTC" for historical times. The description of Julian Date says it's counted "in UTC", and the statement of the MJD epoch describes its 1858 time as being specified in UTC. UTC is defined entirely by its relationship to TAI, which is defined by the operation of atomic clocks. TAI is therefore only defined for the period since the operation of the first caesium atomic clock in the middle of 1955. The UTC<->TAI relationship isn't actually defined even that far back: UTC begins at the beginning of 1961 (and that was not in the modern form with leap seconds). It is therefore incorrect to apply the term "UTC" to any time prior to 1961. These two references to UTC should instead be to "UT", the wider class of closely-matching time scales of which UTC is one representative. Also, in the first sentence of this doc section, the phrase "universal time (UTC)" should be either "universal time (UT)" or (more likely) "coordinated universal time (UTC)". -zefram From unknown Tue Jun 17 01:44:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21902: doc incorrectly describes Julian Date Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 24 Jun 2016 17:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21902 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Zefram Cc: 21902@debbugs.gnu.org, guile-devel@gnu.org Received: via spool by 21902-submit@debbugs.gnu.org id=B21902.14667890418597 (code B ref 21902); Fri, 24 Jun 2016 17:24:02 +0000 Received: (at 21902) by debbugs.gnu.org; 24 Jun 2016 17:24:01 +0000 Received: from localhost ([127.0.0.1]:54611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUpl-0002Eb-Fo for submit@debbugs.gnu.org; Fri, 24 Jun 2016 13:24:01 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:59721 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGUph-0002ES-Gz for 21902@debbugs.gnu.org; Fri, 24 Jun 2016 13:24:00 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 06A9A1FEA6; Fri, 24 Jun 2016 13:23:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=rMvGLDUo6tLepSUI4X9SJpFgQ74=; b=XpSmEP inzkQPmnSpbwTHWGWETpT3MXSbYbuhj+W0jjTkegObY9isToKP3jxLTl4No24Rt1 PHdiMr/0rQK/ASWtcD1vNTqAlfH/OgxNU8CTTcl7vZyKAJPn05FgOZ6KDTrvl4+D S12cXvlBfx2FaqMZ+BOPWDlDlJKd8wqJhQz6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Nze4OI/gV9e0b+Qu7PJvXkJaTvHPLCbp 00N5KfI9Up0NNzjjAieKE7YPYoYs1vvCC7VNHBVGdeifstWFYkvxumbDzxDm3zHx ii4M1fNdNzG+WR/Z9f3srAzVEVsc4HGOTr9WD1Wq5y/kKkwr1noukrb79onYYpxx 6NL5en4sAZM= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id F27961FEA5; Fri, 24 Jun 2016 13:23:55 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 3B08D1FEA4; Fri, 24 Jun 2016 13:23:55 -0400 (EDT) From: Andy Wingo References: <20151113125813.GM13455@fysh.org> Date: Fri, 24 Jun 2016 19:23:48 +0200 In-Reply-To: <20151113125813.GM13455@fysh.org> (zefram@fysh.org's message of "Fri, 13 Nov 2015 12:58:13 +0000") Message-ID: <87eg7mcxgb.fsf@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 6DBBA548-3A30-11E6-A954-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) 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: -1.4 (-) Greets, Time is not my area of expertise :) Cc'ing guile-devel to see if someone can review the ideas. Would you like to propose a specific patch to the documentation? The file is in doc/ref/srfi-modules.texi. Regards, Andy On Fri 13 Nov 2015 13:58, Zefram writes: > The manual says, in the section "SRFI-19 Introduction", > > # Also, for those not familiar with the terminology, a "Julian Day" is > # a real number which is a count of days and fraction of a day, in UTC, > # starting from -4713-01-01T12:00:00Z, ie. midday Monday 1 Jan 4713 B.C. > > There are two errors in the first statement of the epoch for Julian Date, > in ISO 8601 format. The JD epoch is noon on 1 January 4713 BC *in the > proleptic Julian calendar*. The ISO 8601 format is properly never used on > the Julian calendar: ISO 8601 specifies the use of the Gregorian calendar, > including proleptically where necessary (as it most certainly is here). > On the proleptic Gregorian calendar, the JD epoch is noon on 24 November > 4714 BC, and so the ISO 8601 expression should have some "-11-24". > > The second error is in how the year is expressed in ISO 8601. The initial > "-" does not mean the BC era, it means that the year number is negative. > ISO 8601 specifies that the AD era is always used, with year numbers > going negative where necessary; this arrangement is commonly known as > "astronomical year numbering". So "0000" means 1 BC, "-0001" means 2 > BC, and "-4713" means 4714 BC. So the "-4713" is not correct for the > attempted expression of the Julian calendar date, but happens to be > correct for the Gregorian calendar date. > > Putting it together, a correct ISO 8601 expression for the Julian Date > epoch is "-4713-11-24T12:00:00Z". > > The word-based statement of the JD epoch is correct as far as it goes, > but would benefit considerably by the addition of a clause stating that > it is in the proleptic Julian calendar. (Generally, a clarification > of which calendar is being used is helpful with the statement of any > date prior to the UK's switch of calendar in 1752.) The description of > Modified Julian Date is essentially correct. > > However, there's a third problem: misuse of the term "UTC" for historical > times. The description of Julian Date says it's counted "in UTC", > and the statement of the MJD epoch describes its 1858 time as being > specified in UTC. UTC is defined entirely by its relationship to TAI, > which is defined by the operation of atomic clocks. TAI is therefore > only defined for the period since the operation of the first caesium > atomic clock in the middle of 1955. The UTC<->TAI relationship isn't > actually defined even that far back: UTC begins at the beginning of > 1961 (and that was not in the modern form with leap seconds). It is > therefore incorrect to apply the term "UTC" to any time prior to 1961. > These two references to UTC should instead be to "UT", the wider class > of closely-matching time scales of which UTC is one representative. > Also, in the first sentence of this doc section, the phrase "universal > time (UTC)" should be either "universal time (UT)" or (more likely) > "coordinated universal time (UTC)". > > -zefram From unknown Tue Jun 17 01:44:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21902: doc incorrectly describes Julian Date Resent-From: Zefram Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 24 Jun 2016 18:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21902 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: 21902@debbugs.gnu.org, guile-devel@gnu.org Received: via spool by 21902-submit@debbugs.gnu.org id=B21902.146679130812437 (code B ref 21902); Fri, 24 Jun 2016 18:02:01 +0000 Received: (at 21902) by debbugs.gnu.org; 24 Jun 2016 18:01:48 +0000 Received: from localhost ([127.0.0.1]:54620 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGVQJ-0003EV-Q0 for submit@debbugs.gnu.org; Fri, 24 Jun 2016 14:01:47 -0400 Received: from river.fysh.org ([87.98.248.19]:58815 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGVQJ-0003EO-1s for 21902@debbugs.gnu.org; Fri, 24 Jun 2016 14:01:47 -0400 Received: from zefram by river.fysh.org with local (Exim 4.84_2 #1 (Debian)) id 1bGVQF-0002Gr-JQ; Fri, 24 Jun 2016 19:01:43 +0100 Date: Fri, 24 Jun 2016 19:01:43 +0100 From: Zefram Message-ID: <20160624180143.GI1170@fysh.org> References: <20151113125813.GM13455@fysh.org> <87eg7mcxgb.fsf@pobox.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline In-Reply-To: <87eg7mcxgb.fsf@pobox.com> X-Spam-Score: -1.4 (-) 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: -1.4 (-) --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Andy Wingo wrote: >Would you like to propose a specific patch to the documentation? Sure. Patch attached. -zefram --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=d0 --- a/doc/ref/srfi-modules.texi 2014-03-20 20:21:21.000000000 +0000 +++ b/doc/ref/srfi-modules.texi 2016-06-24 18:57:59.088243245 +0100 @@ -2461,8 +2461,8 @@ @cindex UTC @cindex TAI This module implements time and date representations and calculations, -in various time systems, including universal time (UTC) and atomic -time (TAI). +in various time systems, including Coordinated Universal Time (UTC) +and International Atomic Time (TAI). For those not familiar with these time systems, TAI is based on a fixed length second derived from oscillations of certain atoms. UTC @@ -2494,18 +2494,12 @@ @cindex julian day @cindex modified julian day Also, for those not familiar with the terminology, a @dfn{Julian Day} -is a real number which is a count of days and fraction of a day, in -UTC, starting from -4713-01-01T12:00:00Z, ie.@: midday Monday 1 Jan -4713 B.C. A @dfn{Modified Julian Day} is the same, but starting from -1858-11-17T00:00:00Z, ie.@: midnight 17 November 1858 UTC. That time -is julian day 2400000.5. - -@c The SRFI-1 spec says -4714-11-24T12:00:00Z (November 24, -4714 at -@c noon, UTC), but this is incorrect. It looks like it might have -@c arisen from the code incorrectly treating years a multiple of 100 -@c but not 400 prior to 1582 as non-leap years, where instead the Julian -@c calendar should be used so all multiples of 4 before 1582 are leap -@c years. +is a real number which is a count of days and fraction of a day, in UT, +starting from -4713-11-24T12:00:00Z, ie.@: midday UT on Monday 24 November +4714 BC in the proleptic Gregorian calendar (1 January 4713 BC in the +proleptic Julian calendar). A @dfn{Modified Julian Day} is the same, +but starting from 1858-11-17T00:00:00Z, ie.@: midnight UT on Wednesday +17 November AD 1858. That time is julian day 2400000.5. @node SRFI-19 Time --9jxsPFA5p3P2qPhR-- From unknown Tue Jun 17 01:44:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21902: reviewer for time-related bugs (srfi-19) Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Sat, 25 Jun 2016 09:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21902 X-GNU-PR-Package: guile X-GNU-PR-Keywords: To: Zefram , guile-devel@gnu.org Cc: 21902@debbugs.gnu.org Received: via spool by 21902-submit@debbugs.gnu.org id=B21902.146684742117350 (code B ref 21902); Sat, 25 Jun 2016 09:37:01 +0000 Received: (at 21902) by debbugs.gnu.org; 25 Jun 2016 09:37:01 +0000 Received: from localhost ([127.0.0.1]:54892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGk1N-0004Vi-5F for submit@debbugs.gnu.org; Sat, 25 Jun 2016 05:37:01 -0400 Received: from pb-sasl1.pobox.com ([64.147.108.66]:55225 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bGk1K-0004VY-AN for 21902@debbugs.gnu.org; Sat, 25 Jun 2016 05:36:59 -0400 Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id C345417B1F; Sat, 25 Jun 2016 05:36:56 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=Lvp99Nb22v3No+89DBpVGIWjDCQ=; b=b0berW z1T/3TUfsn5WxF+YCzdeJS2dhWeaJ+BJNE/O2WFUhEPQ0xjfJz4pVlb4TgPASPPW IL13WC0CgwO3z9DYkIyb6lXhbx49UW2HUVB2OZvBvX2jCvROpGeKf6B7GdqDqmcL VLH9DtwZxmtHUhvJHZxZMawKZP5jxfE/c25/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=n6iewB/ygphsnR8wpoOnxkmEa8ElqIgF NtVUE3sqJFQ65Hjd1OSFrxrlfGLmWW+4MmGvztT8X2z3aBkutCJA7McsHpoa1Amd cm3WdZp0Kk9ZIfuL6oJl2+kp39UX1qFGD4OTEvkNVizWtmMAWkM3yjddcf8rqmgL XmNv/sYILrw= Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id A85D017B1D; Sat, 25 Jun 2016 05:36:56 -0400 (EDT) Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id CD57F17B1B; Sat, 25 Jun 2016 05:36:55 -0400 (EDT) From: Andy Wingo References: <20151113125813.GM13455@fysh.org> <87eg7mcxgb.fsf@pobox.com> <20160624180143.GI1170@fysh.org> Date: Sat, 25 Jun 2016 11:36:48 +0200 In-Reply-To: <20160624180143.GI1170@fysh.org> (zefram@fysh.org's message of "Fri, 24 Jun 2016 19:01:43 +0100") Message-ID: <87r3blboen.fsf_-_@pobox.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 5B2FF9DC-3AB8-11E6-BCA8-C1836462E9F6-02397024!pb-sasl1.pobox.com X-Spam-Score: -1.4 (-) 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: -1.4 (-) Thanks, that's great :) For this and the other time-related bugs it sounds like you know what you're doing but I would like someone to check the work just to make sure we're not introducing new errors. To that end, I ask guile-devel, in this top-post so that people will see it :), for a volunteer! Are you a person who is interested in the specifics of time representation? TAI, UTC, and all that? If so your input is very much appreciated on the patch quoted below from bug 21902, and also on these other bugs: https://debbugs.gnu.org/21902 doc incorrectly describes Julian Date https://debbugs.gnu.org/21903 date->string duff ISO 8601 negative years https://debbugs.gnu.org/21904 date->string duff ISO 8601 format for non-4-digit years https://debbugs.gnu.org/21906 julian-day->date negative input breakage https://debbugs.gnu.org/21907 date->string duff ISO 8601 zone format https://debbugs.gnu.org/21911 TAI-to-UTC conversion leaps at wrong time https://debbugs.gnu.org/21912 TAI<->UTC conversion botches the unknown https://debbugs.gnu.org/22033 time-utc format is lossy https://debbugs.gnu.org/22034 time-utc->date shows bogus zone-dependent leap second To give feedback is very easy. The first thing is to confirm the bug report: does it make sense to you? If you or Zefram comes up with a patch to fix the issue, as below, that's even better of course, but already just a confirmation of the bug would be great. To comment on the bug, just send a mail to NNNN@debbugs.gnu.org, where NNNN is the bug number. Super easy. Cheers, and thanks in advance! Andy On Fri 24 Jun 2016 20:01, Zefram writes: > Andy Wingo wrote: >>Would you like to propose a specific patch to the documentation? > > Sure. Patch attached. > > -zefram > > --- a/doc/ref/srfi-modules.texi 2014-03-20 20:21:21.000000000 +0000 > +++ b/doc/ref/srfi-modules.texi 2016-06-24 18:57:59.088243245 +0100 > @@ -2461,8 +2461,8 @@ > @cindex UTC > @cindex TAI > This module implements time and date representations and calculations, > -in various time systems, including universal time (UTC) and atomic > -time (TAI). > +in various time systems, including Coordinated Universal Time (UTC) > +and International Atomic Time (TAI). > > For those not familiar with these time systems, TAI is based on a > fixed length second derived from oscillations of certain atoms. UTC > @@ -2494,18 +2494,12 @@ > @cindex julian day > @cindex modified julian day > Also, for those not familiar with the terminology, a @dfn{Julian Day} > -is a real number which is a count of days and fraction of a day, in > -UTC, starting from -4713-01-01T12:00:00Z, ie.@: midday Monday 1 Jan > -4713 B.C. A @dfn{Modified Julian Day} is the same, but starting from > -1858-11-17T00:00:00Z, ie.@: midnight 17 November 1858 UTC. That time > -is julian day 2400000.5. > - > -@c The SRFI-1 spec says -4714-11-24T12:00:00Z (November 24, -4714 at > -@c noon, UTC), but this is incorrect. It looks like it might have > -@c arisen from the code incorrectly treating years a multiple of 100 > -@c but not 400 prior to 1582 as non-leap years, where instead the Julian > -@c calendar should be used so all multiples of 4 before 1582 are leap > -@c years. > +is a real number which is a count of days and fraction of a day, in UT, > +starting from -4713-11-24T12:00:00Z, ie.@: midday UT on Monday 24 November > +4714 BC in the proleptic Gregorian calendar (1 January 4713 BC in the > +proleptic Julian calendar). A @dfn{Modified Julian Day} is the same, > +but starting from 1858-11-17T00:00:00Z, ie.@: midnight UT on Wednesday > +17 November AD 1858. That time is julian day 2400000.5. > > > @node SRFI-19 Time From unknown Tue Jun 17 01:44:28 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Zefram Subject: bug#21902: closed (Re: bug#21902: doc incorrectly describes Julian Date) Message-ID: References: <875zxw47gt.fsf@netris.org> <20151113125813.GM13455@fysh.org> X-Gnu-PR-Message: they-closed 21902 X-Gnu-PR-Package: guile Reply-To: 21902@debbugs.gnu.org Date: Sat, 20 Oct 2018 21:47:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1540072022-26959-1" This is a multi-part message in MIME format... ------------=_1540072022-26959-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21902: doc incorrectly describes Julian Date which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21902@debbugs.gnu.org. --=20 21902: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21902 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1540072022-26959-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21902-done) by debbugs.gnu.org; 20 Oct 2018 21:46:46 +0000 Received: from localhost ([127.0.0.1]:33532 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDz54-00070O-7V for submit@debbugs.gnu.org; Sat, 20 Oct 2018 17:46:46 -0400 Received: from world.peace.net ([64.112.178.59]:60666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gDz52-00070B-IC for 21902-done@debbugs.gnu.org; Sat, 20 Oct 2018 17:46:44 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gDz4w-0007wq-L1; Sat, 20 Oct 2018 17:46:38 -0400 From: Mark H Weaver To: Zefram Subject: Re: bug#21902: doc incorrectly describes Julian Date References: <20151113125813.GM13455@fysh.org> Date: Sat, 20 Oct 2018 17:46:26 -0400 In-Reply-To: <20151113125813.GM13455@fysh.org> (Zefram's message of "Fri, 13 Nov 2015 12:58:13 +0000") Message-ID: <875zxw47gt.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 21902-done Cc: 21902-done@debbugs.gnu.org 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: -1.0 (-) Zefram writes: > The manual says, in the section "SRFI-19 Introduction", > > # Also, for those not familiar with the terminology, a "Julian Day" is > # a real number which is a count of days and fraction of a day, in UTC, > # starting from -4713-01-01T12:00:00Z, ie. midday Monday 1 Jan 4713 B.C. > > There are two errors in the first statement of the epoch for Julian Date, > in ISO 8601 format. The JD epoch is noon on 1 January 4713 BC *in the > proleptic Julian calendar*. The ISO 8601 format is properly never used on > the Julian calendar: ISO 8601 specifies the use of the Gregorian calendar, > including proleptically where necessary (as it most certainly is here). > On the proleptic Gregorian calendar, the JD epoch is noon on 24 November > 4714 BC, and so the ISO 8601 expression should have some "-11-24". > > The second error is in how the year is expressed in ISO 8601. The initial > "-" does not mean the BC era, it means that the year number is negative. > ISO 8601 specifies that the AD era is always used, with year numbers > going negative where necessary; this arrangement is commonly known as > "astronomical year numbering". So "0000" means 1 BC, "-0001" means 2 > BC, and "-4713" means 4714 BC. So the "-4713" is not correct for the > attempted expression of the Julian calendar date, but happens to be > correct for the Gregorian calendar date. > > Putting it together, a correct ISO 8601 expression for the Julian Date > epoch is "-4713-11-24T12:00:00Z". > > The word-based statement of the JD epoch is correct as far as it goes, > but would benefit considerably by the addition of a clause stating that > it is in the proleptic Julian calendar. (Generally, a clarification > of which calendar is being used is helpful with the statement of any > date prior to the UK's switch of calendar in 1752.) The description of > Modified Julian Date is essentially correct. > > However, there's a third problem: misuse of the term "UTC" for historical > times. The description of Julian Date says it's counted "in UTC", > and the statement of the MJD epoch describes its 1858 time as being > specified in UTC. UTC is defined entirely by its relationship to TAI, > which is defined by the operation of atomic clocks. TAI is therefore > only defined for the period since the operation of the first caesium > atomic clock in the middle of 1955. The UTC<->TAI relationship isn't > actually defined even that far back: UTC begins at the beginning of > 1961 (and that was not in the modern form with leap seconds). It is > therefore incorrect to apply the term "UTC" to any time prior to 1961. > These two references to UTC should instead be to "UT", the wider class > of closely-matching time scales of which UTC is one representative. > Also, in the first sentence of this doc section, the phrase "universal > time (UTC)" should be either "universal time (UT)" or (more likely) > "coordinated universal time (UTC)". I changed the text, based partly on your proposed patch and partly based on similar recent fixes in the upstream SRFI-19 document, in commit 5106377a3460e1e35daf14ea6edbe80426347155 on the stable-2.2 branch. I'm closing this bug now, but feel free to reopen if there are still problems. Thanks! Mark ------------=_1540072022-26959-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 13 Nov 2015 12:58:43 +0000 Received: from localhost ([127.0.0.1]:36715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxDwA-0000M7-CD for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:42 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54101) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZxDvp-0000LZ-Hq for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxDvn-0003Ru-Ve for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:21 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxDvn-0003Rq-Sd for submit@debbugs.gnu.org; Fri, 13 Nov 2015 07:58:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxDvm-0000PS-Ro for bug-guile@gnu.org; Fri, 13 Nov 2015 07:58:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZxDvl-0003Rd-N1 for bug-guile@gnu.org; Fri, 13 Nov 2015 07:58:18 -0500 Received: from river6.fysh.org ([2001:41d0:d:20da::2]:35918 helo=river.fysh.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZxDvl-0003RW-Fo for bug-guile@gnu.org; Fri, 13 Nov 2015 07:58:17 -0500 Received: from zefram by river.fysh.org with local (Exim 4.80 #2 (Debian)) id 1ZxDvh-00075y-6y; Fri, 13 Nov 2015 12:58:13 +0000 Date: Fri, 13 Nov 2015 12:58:13 +0000 From: Zefram To: bug-guile@gnu.org Subject: doc incorrectly describes Julian Date Message-ID: <20151113125813.GM13455@fysh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 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: -4.0 (----) The manual says, in the section "SRFI-19 Introduction", # Also, for those not familiar with the terminology, a "Julian Day" is # a real number which is a count of days and fraction of a day, in UTC, # starting from -4713-01-01T12:00:00Z, ie. midday Monday 1 Jan 4713 B.C. There are two errors in the first statement of the epoch for Julian Date, in ISO 8601 format. The JD epoch is noon on 1 January 4713 BC *in the proleptic Julian calendar*. The ISO 8601 format is properly never used on the Julian calendar: ISO 8601 specifies the use of the Gregorian calendar, including proleptically where necessary (as it most certainly is here). On the proleptic Gregorian calendar, the JD epoch is noon on 24 November 4714 BC, and so the ISO 8601 expression should have some "-11-24". The second error is in how the year is expressed in ISO 8601. The initial "-" does not mean the BC era, it means that the year number is negative. ISO 8601 specifies that the AD era is always used, with year numbers going negative where necessary; this arrangement is commonly known as "astronomical year numbering". So "0000" means 1 BC, "-0001" means 2 BC, and "-4713" means 4714 BC. So the "-4713" is not correct for the attempted expression of the Julian calendar date, but happens to be correct for the Gregorian calendar date. Putting it together, a correct ISO 8601 expression for the Julian Date epoch is "-4713-11-24T12:00:00Z". The word-based statement of the JD epoch is correct as far as it goes, but would benefit considerably by the addition of a clause stating that it is in the proleptic Julian calendar. (Generally, a clarification of which calendar is being used is helpful with the statement of any date prior to the UK's switch of calendar in 1752.) The description of Modified Julian Date is essentially correct. However, there's a third problem: misuse of the term "UTC" for historical times. The description of Julian Date says it's counted "in UTC", and the statement of the MJD epoch describes its 1858 time as being specified in UTC. UTC is defined entirely by its relationship to TAI, which is defined by the operation of atomic clocks. TAI is therefore only defined for the period since the operation of the first caesium atomic clock in the middle of 1955. The UTC<->TAI relationship isn't actually defined even that far back: UTC begins at the beginning of 1961 (and that was not in the modern form with leap seconds). It is therefore incorrect to apply the term "UTC" to any time prior to 1961. These two references to UTC should instead be to "UT", the wider class of closely-matching time scales of which UTC is one representative. Also, in the first sentence of this doc section, the phrase "universal time (UTC)" should be either "universal time (UT)" or (more likely) "coordinated universal time (UTC)". -zefram ------------=_1540072022-26959-1--