Hi Carsten On Fri, Jun 10, 2011 at 10:20, Carsten Dominik <carsten.domi...@gmail.com> wrote: > When I evaluate this form > (decode-time (days-to-time (time-to-days (current-time)))) > I get a date in the year 3980. I think this used to work. > Is there anyone who has an idea what is going on here?
Same here (except the "I think this used to work") on GNU Emacs 23.3.1 x86_64-apple-darwin that is 64 bit and has also the famous time_t with 64 bits. The error reported by others comes from time_t with 32 bits. decode-time checks for overflow of time_t before either passing it to the system call localtime(const time_t *), or giving the error. But since it's only a mismatch of current-time with base 1970 and time-to-days with base 1bec, is (decode-time (days-to-time (- (time-to-days (current-time)) (time-to-days '(0 0))))) what you need? Why the *days* function, for some rounding? Michael