bugOrg Edna - Bugs: bug #64126, scheduled!("Wed") and...

 
 

bug #64126: scheduled!("Wed") and similar off by one day early

Submitter:  None
Submitted:  Sat 29 Apr 2023 02:20:32 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 30 Apr 2023 02:47:37 PM UTC, comment #1: 

I submitted the following by email as instructed in the documentation:

Here's a fix for bug #64126 that I filed earlier today. In short, when getting the time data to pass to encode-time earlier in org-edna--handle-planning, the last argument for the utcoffset was nil, but later on the final call to encode-time the mapcar wipes out that last nil value and replaces it with 0. This makes the final encode-time result relative to UTC, not the local time. My patch replaces only the two time values with 0 if they are nil, and leaves the rest of the time data alone.

After some quick testing with the examples in the documentation for scheduled! and deadline!, I believe everything is functioning as expected with the patch in use.

(file #54689)

Jeremias Gonzalez <jgonzalez49>
Sat 29 Apr 2023 02:20:32 PM UTC, original submission:  

When using the scheduled!("Wed") and similar commands, the date adjustment is off by one day early. Here's an example headline (same as in the attached test.org file) :

* TODO My test headline
SCHEDULED: <2023-04-30 Sun>
:PROPERTIES:
:TRIGGER: self todo!(TODO) scheduled!("Wed")
:END:


After marking the task as done, the headline becomes

* TODO My test headline
SCHEDULED: <2023-05-02 Tue>
:PROPERTIES:
:TRIGGER: self todo!(TODO) scheduled!("Wed")
:END:

which is not the expected timestamp, I would expect <2023-05-03 Wed>

Emacs version

GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2023-04-29


Org version:

Org mode version 9.7-pre (release_9.6.4-345-g52d996 @ /home/myuser/.emacs.d/straight/build/org/)


Org-edna git hash:

de6454949045453e0fa025e605b445c3ca05c62a


Org-edna package config:

(use-package org-edna
  :after org
  :config
  (org-edna-mode)
  )


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54687:  test.org added by None (116B - text/org)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jgonzalez49 (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-04-30 jgonzalez49 Attached File- Added 0001-Fixed-time-passed-to-encoder.patch, #54689
    2023-04-29 None Attached File- Added test.org, #54687

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code