emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Cannot schedule something for 2039?
@ 2021-06-07  8:12 alan.schmitt
  2021-06-07  9:17 ` Richard Lawrence
  2021-06-07  9:24 ` Samuel Loury
  0 siblings, 2 replies; 5+ messages in thread
From: alan.schmitt @ 2021-06-07  8:12 UTC (permalink / raw)
  To: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cannot schedule something for 2039?
  2021-06-07  8:12 Cannot schedule something for 2039? alan.schmitt
@ 2021-06-07  9:17 ` Richard Lawrence
  2021-06-07  9:39   ` Alan Schmitt
  2021-06-07  9:24 ` Samuel Loury
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Lawrence @ 2021-06-07  9:17 UTC (permalink / raw)
  To: alan.schmitt, emacs-orgmode

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cannot schedule something for 2039?
  2021-06-07  8:12 Cannot schedule something for 2039? alan.schmitt
  2021-06-07  9:17 ` Richard Lawrence
@ 2021-06-07  9:24 ` Samuel Loury
  1 sibling, 0 replies; 5+ messages in thread
From: Samuel Loury @ 2021-06-07  9:24 UTC (permalink / raw)
  To: alan.schmitt, emacs-orgmode


[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cannot schedule something for 2039?
  2021-06-07  9:17 ` Richard Lawrence
@ 2021-06-07  9:39   ` Alan Schmitt
  2021-06-07 20:42     ` Samuel Wales
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Schmitt @ 2021-06-07  9:39 UTC (permalink / raw)
  To: Richard Lawrence, emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Cannot schedule something for 2039?
  2021-06-07  9:39   ` Alan Schmitt
@ 2021-06-07 20:42     ` Samuel Wales
  0 siblings, 0 replies; 5+ messages in thread
From: Samuel Wales @ 2021-06-07 20:42 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: Richard Lawrence, emacs-orgmode

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-07 20:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07  8:12 Cannot schedule something for 2039? alan.schmitt
2021-06-07  9:17 ` Richard Lawrence
2021-06-07  9:39   ` Alan Schmitt
2021-06-07 20:42     ` Samuel Wales
2021-06-07  9:24 ` Samuel Loury

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).