[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Represent NTP's origin time
From: |
Andreas Schwab |
Subject: |
Re: Represent NTP's origin time |
Date: |
Thu, 15 Apr 2021 10:06:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
On Apr 15 2021, Stefan Monnier wrote:
> NTP represents time stamps by counting seconds from January 1 1900, but
> my Emacs doesn't seem to be able to represent this:
>
> (encode-time (parse-time-string "1902-01-01T00:00-00:00"))
> => (-32745 59520)
> (encode-time (parse-time-string "1900-01-01T00:00-00:00"))
> => (error "Specified time is not representable")
>
> Do we have some "standard" workaround?
Worksforme.
ELISP> (encode-time (parse-time-string "1900-01-01T00:00-00:00"))
(-33707 33152)
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."