[-- Attachment #1: Type: text/plain, Size: 178 bytes --] Hello, I need to schedule something for 2039, but when I do it the date is set for 2037. I tried with a plain emacs config and I see the same issue. Is this a bug? Best, Alan [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --]
Hi Alan,
alan.schmitt@polytechnique.org writes:
> I need to schedule something for 2039, but when I do it the date is set
> for 2037. I tried with a plain emacs config and I see the same issue. Is
> this a bug?
whoa, that's a weird behavior, but it seems not to be a bug. I learned
something today!
It looks like some Emacs implementations don't support dates after
2038-1-1, so Org doesn't let you specify them by default. See the
variable `org-read-date-force-compatible-dates'. I think you want to set
this variable to nil.
--
Best,
Richard
[-- Attachment #1.1: Type: text/plain, Size: 367 bytes --] alan.schmitt@polytechnique.org writes: [...] > I need to schedule something for 2039, but when I do it the date is set > for 2037. I tried with a plain emacs config and I see the same issue. Is > this a bug? Sounds like the bug of 2038¹. I assume that 32 bit integers are used somewhere to encode the date. For the record, I see the same behavior. [-- Attachment #1.2: 2021-06-07T11-24-13-02-00.png --] [-- Type: image/png, Size: 5391 bytes --] [-- Attachment #1.3: Type: text/plain, Size: 159 bytes --] ¹ https://en.wikipedia.org/wiki/Year_2038_problem -- Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 487 bytes --]
[-- Attachment #1: Type: text/plain, Size: 788 bytes --] Hello Richard, On 2021-06-07 11:17, Richard Lawrence <richard.lawrence@uni-tuebingen.de> writes: > whoa, that's a weird behavior, but it seems not to be a bug. I learned > something today! > > It looks like some Emacs implementations don't support dates after > 2038-1-1, so Org doesn't let you specify them by default. See the > variable `org-read-date-force-compatible-dates'. I think you want to set > this variable to nil. Thanks a lot for pointing to this variable, its docstring is quite interesting. I’m trying the workaround suggested (using a diary sexp, i.e., "<%%(diary-date 2039 4 2)>" in my case), but I cannot test it (the agenda for that date won’t build, at the date is outside the range). I guess this will be fixed by then ;) Best, Alan [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 528 bytes --]
fwiw i ran this once: ;;(/ (org-time-string-to-seconds "-9999-01-01 00:00") 60.0) 4222846500.0 ;;(/ (org-time-string-to-seconds "-0001-12-31 00:00") 60.0) -1035068671.7 ;; oops ;;(/ (org-time-string-to-seconds "0000-12-31 00:00") 60.0) -1035594271.7 ;;(/ (org-time-string-to-seconds "0001-12-31 00:00") 60.0) -1035068671.7 ;;(/ (org-time-string-to-seconds "1000-12-31 00:00") 60.0) -509645791.7 ;;(/ (org-time-string-to-seconds "1776-12-31 00:00") 60.0) -101508031.7 ;;(/ (org-time-string-to-seconds "1900-12-31 00:00") 60.0) -36291900.0 ;; nan on non-64 ;;(/ (org-time-string-to-seconds "1901-12-31 00:00") 60.0) -35766300.0 ;;(/ (org-time-string-to-seconds "1934-12-31 00:00") 60.0) -18409980.0 ;;(/ (org-time-string-to-seconds "1960-12-31 00:00") 60.0) -4734300.0 ;;(/ (org-time-string-to-seconds "1969-12-31 00:00") 60.0) -1020.0 ;;(/ (org-time-string-to-seconds "1970-01-01 00:00") 60.0) 420.0 ;;(/ (org-time-string-to-seconds "1980-01-01 00:00") 60.0) 5259300.0 ;;(/ (org-time-string-to-seconds "1990-01-01 00:00") 60.0) 10519620.0 ;;(/ (org-time-string-to-seconds "2000-01-01 00:00") 60.0) 15778500.0 ;;(/ (org-time-string-to-seconds "2010-01-01 00:00") 60.0) 21038820.0 ;;(/ (org-time-string-to-seconds "2038-01-01 00:00") 60.0) 35765700.0 ;;(/ (org-time-string-to-seconds "2138-01-01 00:00") 60.0) 88360260.0 ;;(/ (org-time-string-to-seconds "9999-01-01 00:00") 60.0) 4222846500.0 ;; nan on non-64 On 6/7/21, Alan Schmitt <alan.schmitt@polytechnique.org> wrote: > Hello Richard, > > On 2021-06-07 11:17, Richard Lawrence <richard.lawrence@uni-tuebingen.de> > writes: > >> whoa, that's a weird behavior, but it seems not to be a bug. I learned >> something today! >> >> It looks like some Emacs implementations don't support dates after >> 2038-1-1, so Org doesn't let you specify them by default. See the >> variable `org-read-date-force-compatible-dates'. I think you want to set >> this variable to nil. > > Thanks a lot for pointing to this variable, its docstring is quite > interesting. > > I’m trying the workaround suggested (using a diary sexp, i.e., > "<%%(diary-date 2039 4 2)>" in my case), but I cannot test it (the > agenda for that date won’t build, at the date is outside the range). I > guess this will be fixed by then ;) > > Best, > > Alan > -- The Kafka Pandemic Please learn what misopathy is. https://thekafkapandemic.blogspot.com/2013/10/why-some-diseases-are-wronged.html