From bb08be47409e81c78dbcddaada69fb4a63d0211b Mon Sep 17 00:00:00 2001 From: Dustin Farris Date: Mon, 17 Feb 2025 11:33:57 -0800 Subject: [PATCH] refactor!: do not include time zone in org iso8601 org mode timestamps do not support time zones, so returning the machine's local time zone is misleading. Also, org-format-time-string is an obsolete alias of format-time-string. Ref: https://github.com/emacs-straight/org-mode/commit/cc2490a7061955395c4f5a1a23a088044554a2f7 --- org-roam-db.el | 4 ++-- tests/test-org-roam-db.el | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org-roam-db.el b/org-roam-db.el index 8566270..ebf2d4e 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -367,12 +367,12 @@ If HASH is non-nil, use that as the file's hash without recalculating it." (defun org-roam-db-get-scheduled-time () "Return the scheduled time at point in ISO8601 format." (when-let ((time (org-get-scheduled-time (point)))) - (org-format-time-string "%FT%T%z" time))) + (format-time-string "%FT%T" time))) (defun org-roam-db-get-deadline-time () "Return the deadline time at point in ISO8601 format." (when-let ((time (org-get-deadline-time (point)))) - (org-format-time-string "%FT%T%z" time))) + (format-time-string "%FT%T" time))) (defun org-roam-db-node-p () "Return t if headline at point is an Org-roam node, else return nil." diff --git a/tests/test-org-roam-db.el b/tests/test-org-roam-db.el index 8715ca0..2e669df 100644 --- a/tests/test-org-roam-db.el +++ b/tests/test-org-roam-db.el @@ -41,7 +41,7 @@ (it "should get scheduled time for current heading node" (org-roam-id-open "a523c198-4cb4-44d2-909c-a0e3258089cd" nil) - (expect (org-roam-db-get-scheduled-time) :to-equal "2024-07-16T00:00:00+0000"))) + (expect (org-roam-db-get-scheduled-time) :to-equal "2024-07-16T00:00:00"))) (describe "org-roam-db-get-deadline-time" (before-all @@ -58,7 +58,7 @@ (it "should get deadline time for current heading node" (org-roam-id-open "3ab84701-d1c1-463f-b5c6-715e6ff5a0bf" nil) - (expect (org-roam-db-get-deadline-time) :to-equal "2024-07-17T00:00:00+0000"))) + (expect (org-roam-db-get-deadline-time) :to-equal "2024-07-17T00:00:00"))) (describe "org-roam-db--file-hash" (it "computes the SHA1 of file"