From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: dates before 1970 Date: Tue, 15 Mar 2011 08:24:24 +0100 Message-ID: <6D45BFD1-141E-462D-8D84-D38B640E78BB@gmail.com> References: <87ei6en127.fsf@ucl.ac.uk> <5422.1299798393@alphaville.usa.hp.com> <87ei6ehwld.fsf@ucl.ac.uk> <4006.1299861015@alphaville.dokosmarshall.org> <3BB12915-004C-4AD3-9753-E59632B7006A@gmail.com> <25878.1300115464@alphaville.dokosmarshall.org> <8990.1300122816@alphaville.dokosmarshall.org> <874o75a7vh.fsf@Rainer.invalid> Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=46134 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzOcJ-0002O8-5R for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 03:24:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzOcH-0006tR-AH for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 03:24:31 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:54039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzOcH-0006tK-1Q for emacs-orgmode@gnu.org; Tue, 15 Mar 2011 03:24:29 -0400 Received: by eyh6 with SMTP id 6so79227eyh.0 for ; Tue, 15 Mar 2011 00:24:28 -0700 (PDT) In-Reply-To: <874o75a7vh.fsf@Rainer.invalid> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Achim Gratz , nicholas dokos Cc: Emacs Org mode mailing list On Mar 14, 2011, at 7:12 PM, Achim Gratz wrote: > Nick Dokos writes: >> I was referring to the C code implementing current-time (which, btw, = has been >> changed in latest): >>=20 >> ,---- >> | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, >> | doc: /* Return the current time, as the number of seconds = since 1970-01-01 00:00:00. >> | The time is returned as a list of three integers. The first has = the >> | most significant 16 bits of the seconds, while the second has the >> | least significant 16 bits. The third integer gives the microsecond >> | count. >> |=20 >> | The microsecond count is zero on systems that do not provide >> | resolution finer than a second. */) >> | (void) >> | { >> | EMACS_TIME t; >> |=20 >> | EMACS_GET_TIME (t); >> | return list3 (make_number ((EMACS_SECS (t) >> 16) & 0xffff), >> | make_number ((EMACS_SECS (t) >> 0) & 0xffff), >> | make_number (EMACS_USECS (t))); >> | } >> `---- >=20 > I can't see how this code works correctly unless it is guaranteed that > EMACS_TIME is 32bit unsigned... Yes, I agree. However, I am just realizing that using 32 bit unsigned for (current-time) is fine for a loong time to come. So the issue if *Org* can handle dates outside the safe range is is not about `current-time' at all, but about what encode-time, decode-time, time-subtract, time-add etc do, what kind of integers they can handle. - Carsten >=20 >=20 > Achim. > --=20 > +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ >=20 > Waldorf MIDI Implementation & additional documentation: > http://Synth.Stromeko.net/Downloads.html#WaldorfDocs >=20 >=20 - Carsten