emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] org-agenda thinks timestamps after 23:00 correspond to the next da


From: Ignacio Casso
Subject: [BUG] org-agenda thinks timestamps after 23:00 correspond to the next day [9.5.2 (release_9.5.2-25-gaf6f12 @ /home/ignacio/repos/emacs/lisp/org/)]
Date: Tue, 29 Mar 2022 15:09:10 +0200
User-agent: mu4e 1.6.10; emacs 29.0.50

Hello,

After last Saturday's hour change in Spain, org-agenda thinks that
timestamps after 23:00 correspond to the next day in Emacs 29. I'm not
actually sure if that is the reason, since I usually use Emacs 27, but I
guess it must be that if I have found out three days after the hour
change.

I have tried to track down the problem, and it doesn't seem to be the
fault of any org-mode code change. The problem is that
(org-time-string-to-time timestamp), defined as (encode-time
(org-parse-time-string timestamp)), returns different things in Emacs 27
and Emacs 29.

Let's consider the timestamp "<2022-03-29 mar 23:00>" as an example:

1) (org-parse-time-string "<2022-03-29 mar 23:00>") returns (0 0 23 29 3
2022 nil nil nil).

2) (encode-time '(0 0 23 29 3 2022 nil nil nil)) returns '(25155 29520)
in Emacs 27, but (25155 33120) in Emacs 29

3.1) (time-to-days '(25155 29520)) returns 738243

3.2) (time-to-days '(25155 33120)) returns 738244

4) (org-today) returns 738243

Therefore, org-agenda thinks that "<2022-03-29 mar 23:00>" is today in
Emacs 27, but tomorrow in Emacs 29.

`encode-time' is defined in C, and is probably system dependent, so this
is probably not an org-mode bug. But maybe org-mode code could try to be
smart about this? I don't know if it's even possible.

And if this should not be fixed in org-mode, do you know were it should?
It could be an Emacs bug? Or maybe the problem is in my system?

Regards,

--Ignacio


Emacs  : GNU Emacs 29.0.50 (build 19, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20, cairo version 1.16.0)
 of 2022-03-29
Package: Org mode version 9.5.2 (release_9.5.2-25-gaf6f12 @ 
/home/ignacio/repos/emacs/lisp/org/)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]