From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: dates before 1970 Date: Mon, 14 Mar 2011 11:21:36 +0100 Message-ID: <3BB12915-004C-4AD3-9753-E59632B7006A@gmail.com> References: <87ei6en127.fsf@ucl.ac.uk> <5422.1299798393@alphaville.usa.hp.com> <87ei6ehwld.fsf@ucl.ac.uk> <4006.1299861015@alphaville.dokosmarshall.org> 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=60268 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pz4ud-0005Gd-3P for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 06:22:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pz4uD-0001cr-Ac for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 06:22:01 -0400 Received: from mail-yw0-f41.google.com ([209.85.213.41]:62926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pz4uC-0001cX-Vl for emacs-orgmode@gnu.org; Mon, 14 Mar 2011 06:21:41 -0400 Received: by yws5 with SMTP id 5so2615524yws.0 for ; Mon, 14 Mar 2011 03:21:40 -0700 (PDT) In-Reply-To: <4006.1299861015@alphaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: Emacs Org mode mailing list On Mar 11, 2011, at 5:30 PM, Nick Dokos wrote: > Carsten Dominik wrote: >=20 >=20 >> THis is exactly the point, that it depends on how Emacs was compiled, = and what kind of integer is used in the date representation. Signed or = unsigend, 32 or 64 bits (I think). >>=20 >> For example, Bastien can represent dates before 1970. I cannot. >> I can represent dates after 2038, Bastien cannot. >>=20 >> The work-around is to use diary sexps for dates before 1970, that = seems to be safe. >> And then hope that by 2038, all computers will use 64 bit = integers.... >>=20 >=20 > But it's even more than that, no? Emacs's time implementation > (current-time, encode/decode etc) would have to change. In fact, this > might be the most significant limitation right now: the values they = pass > around are (hi16 lo16 ms) so they assume that time values are 32 bits, > no matter what the underlying implementation says. I use 64-bit Linux = on > an x86-64 laptop and my time_t is 64 bits (but I don't know if it's > signed or unsigned). Time for some experimentation I guess... I believe that on your system you might get (hi48 lo16 ms) You can test if it is signed by trying a date before 1970 (encode-time 0 0 0 1 1 1960) - Carsten