emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] org-test: Fix zone-dependent miscalculation of days of week


From: Ihor Radchenko
Subject: Re: [PATCH] org-test: Fix zone-dependent miscalculation of days of week
Date: Tue, 04 Jun 2024 13:04:30 +0000

Kyle Meyer <kyle@kyleam.com> writes:

>> If my guess is right, there will always be some timezone where a given
>> number seconds from epoch is a different day...
>> I am not sure how to address this problem.
>
> How about my patch?  Notice that format-time-string is invoked with ZONE
> set to t so that TIME is always taken as UTC.
> ...
> ;;; locale en_US.UTF-8
> ;; local time zone (Japan in this demo)
> (format-time-string "%A %T %z" 259200) => "Sunday 09:00:00 +0900"
> ;; force UTC
> (format-time-string "%A %T %z" 259200 t) => "Sunday 00:00:00 +0000"

Oops. I missed that you added `t' argument.
It indeed makes sense.
Applied, onto bugfix.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=de0df5b92

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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