Re: [O] dates before 1970

2011-03-10 Thread Nick Dokos
Eric S Fraga wrote: > This is a sort of bug report but possibly more a curiosity... > > I imagine this has something to do with time 0 in Unix but I cannot seem > to be able to enter any date earlier than 1 Jan 1970 using C-c! (say). > However, once I have entered a date (later than that), I can

Re: [O] dates before 1970

2011-03-11 Thread Bastien
Hi, Nick Dokos writes: > So I'd guess raising an exception might be the simplest way to deal with > this. Here's a patch to try out: This patch has side-effects that Carsten have been recently exploring a bit. Those side-effects seem to depend on how Emacs has been compiled. For now it's best

Re: [O] dates before 1970

2011-03-11 Thread Carsten Dominik
On Mar 11, 2011, at 9:31 AM, Bastien wrote: > Hi, > > Nick Dokos writes: > >> So I'd guess raising an exception might be the simplest way to deal with >> this. Here's a patch to try out: > > This patch has side-effects that Carsten have been recently exploring a > bit. Those side-effects see

Re: [O] dates before 1970

2011-03-11 Thread Eric S Fraga
Nick Dokos writes: > Eric S Fraga wrote: > >> This is a sort of bug report but possibly more a curiosity... >> >> I imagine this has something to do with time 0 in Unix but I cannot seem >> to be able to enter any date earlier than 1 Jan 1970 using C-c! (say). >> However, once I have entered a

Re: [O] dates before 1970

2011-03-11 Thread Carsten Dominik
On Mar 11, 2011, at 9:47 AM, Eric S Fraga wrote: > Nick Dokos writes: > >> Eric S Fraga wrote: >> >>> This is a sort of bug report but possibly more a curiosity... >>> >>> I imagine this has something to do with time 0 in Unix but I cannot seem >>> to be able to enter any date earlier than 1

Re: [O] dates before 1970

2011-03-11 Thread Eric S Fraga
Carsten Dominik writes: [...] > 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). Yes, that makes sense. > For example, Bastien can represent dates before 1970. I

Re: [O] dates before 1970

2011-03-11 Thread Carsten Dominik
Hi, I asked in emacs-develop and got: > by Andreas Schwabon 2011-03-11T13:19:43+00:00. > > If your system's time-t is a signed 32-bit integer then your system is > able to represent times between 1901-12-13 20:45:53 UTC and 2038-01-19 > 03:14:07 UTC. If your system's time-t is an unsigned 32-bit

Re: [O] dates before 1970

2011-03-11 Thread Nick Dokos
Eric S Fraga wrote: > > So I'd guess raising an exception might be the simplest way to deal with > > this. Here's a patch to try out: > > This seems to work fine. Thanks. > Maybe not - see Bastien's mail. > I am glad, however, that I can enter any date and then use the S- > etc. keys to get

Re: [O] dates before 1970

2011-03-11 Thread Nick Dokos
Carsten Dominik wrote: > 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). > > For example, Bastien can represent dates before 1970. I cannot. > I can represent d

Re: [O] dates before 1970

2011-03-12 Thread Robert Horn
> So I am not sure what 64 bit systems do now or in the future, but > it seems that we need to live with a restriction for now. > Maybe this should be documented somewhere. > > - Carsten Most 64-bit systems use a 64-bit int. All of the 64-bit Linux systems that I've used use a signed 64-bit int

Re: [O] dates before 1970

2011-03-12 Thread Carsten Dominik
Hi everyone, On 11.3.2011, at 09:31, Bastien wrote: > Hi, > > Nick Dokos writes: > >> So I'd guess raising an exception might be the simplest way to deal with >> this. Here's a patch to try out: > > This patch has side-effects that Carsten have been recently exploring a > bit. Those side-eff

Re: [O] dates before 1970

2011-03-13 Thread Eric S Fraga
Carsten Dominik writes: [...] > I am attaching a patch which tries to implement some kind of a > solution for this problem. The patch introduces a new variable > which will allow you to use dates outside the safe range 1970-2037 Thanks Carsten. [...] > The patch also introduces a warning wit

Re: [O] dates before 1970

2011-03-14 Thread Carsten Dominik
Hi Bastien, please let me know if you want this patch installed. - Carsten On 13.3.2011, at 21:08, Eric S Fraga wrote: > Carsten Dominik writes: > > [...] > >> I am attaching a patch which tries to implement some kind of a >> solution for this problem. The patch introduces a new variable >>

Re: [O] dates before 1970

2011-03-14 Thread Bastien
Hi Carsten, Carsten Dominik writes: > please let me know if you want this patch installed. I won't have time to have a close look at this before tomorrow morning, as I'm still out on a week-end. But please go ahead if you think it's okay. Best, -- Bastien

Re: [O] dates before 1970

2011-03-14 Thread Carsten Dominik
On Mar 11, 2011, at 5:30 PM, Nick Dokos wrote: > Carsten Dominik wrote: > > >> 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). >> >> For example, Bastien ca

Re: [O] dates before 1970

2011-03-14 Thread Nick Dokos
Carsten Dominik wrote: > > On Mar 11, 2011, at 5:30 PM, Nick Dokos wrote: > > > Carsten Dominik wrote: > > > > > >> 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 bit

Re: [O] dates before 1970

2011-03-14 Thread Carsten Dominik
On Mar 14, 2011, at 4:11 PM, Nick Dokos wrote: > Carsten Dominik wrote: > >> >> On Mar 11, 2011, at 5:30 PM, Nick Dokos wrote: >> >>> Carsten Dominik wrote: >>> >>> THis is exactly the point, that it depends on how Emacs was compiled, and what kind of integer is used in the date

Re: [O] dates before 1970

2011-03-14 Thread Nick Dokos
Carsten Dominik wrote: > > Ah, OK - thanks! I looked in current-time, saw the 0x mask and I > > thought that the extra bits are truncated, but apparently not: I need to > > go back and look at the C rules again. > > I have no idea what you are talking about :) > You think I do? :) I was

Re: [O] dates before 1970

2011-03-14 Thread Achim Gratz
Nick Dokos writes: > I was referring to the C code implementing current-time (which, btw, has been > changed in latest): > > , > | 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. >

Re: [O] dates before 1970

2011-03-15 Thread Carsten Dominik
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): >> >> , >> | DEFUN ("current-time", Fcurrent_time, Scurrent_time, 0, 0, 0, >> |doc: /* Return the current time