all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: Max Nikulin <manikulin@gmail.com>,
	org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [DRAFT][PATCH] org-encode-time compatibility and convenience helper
Date: Sun, 24 Apr 2022 11:35:28 +0800	[thread overview]
Message-ID: <87o80r17cv.fsf@localhost> (raw)
In-Reply-To: <329701d8-3682-51fd-f086-4e1e06bc9f8d@cs.ucla.edu>

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 4/23/22 01:25, Ihor Radchenko wrote:
>>> +  (should (string-equal
>>> +           "2022-03-24 23:30:01"
>>> +           (format-time-string
>>> +            "%F %T"
>>> +            (org-encode-time '(01 30 23 24 03 2022 nil -1 nil)))))
>>> ...
>> These tests will be executed using system value of TZ. I am not sure if
>> tests are not going to break, say, in southern hemisphere or at some
>> other bizzare values of TZ.
>> 
>
> Good point: that test won't work in a time zone where the local time 
> 23:30:01 does not exist due to a daylight-saving spring-forward transition.

Note that it is rather hypothetical case. It's not just about 23:30:01,
but also about March 24 date. I am now checking
https://en.wikipedia.org/wiki/Daylight_saving_time_by_country The day
saving changes in March are:
- Second Sunday
- Last Sunday
- Friday before last Sunday
- Last Friday
- 20 or 21 March (Iran)
- Fourth Sunday

March 24, 2023 will be the last Friday before last Sunday in March...

The conclusion is: it is all tricky and I would not bet on trying to
find a "safe" date for an arbitrary present time zone DST. It would be
better to set some test TZ for testing and be done with all this
ambiguity.

Best,
Ihor



  reply	other threads:[~2022-04-24  3:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 15:22 [DRAFT][PATCH] org-encode-time compatibility and convenience helper Max Nikulin
2022-04-11 17:43 ` Paul Eggert
2022-04-23  8:25 ` Ihor Radchenko
2022-04-23 19:37   ` Paul Eggert
2022-04-24  3:35     ` Ihor Radchenko [this message]
2022-04-24 11:34   ` [DRAFT][PATCH v2] " Max Nikulin
2022-04-26  9:07     ` Ihor Radchenko
2022-05-03 12:14       ` [PATCH v3] " Max Nikulin
2022-05-04  9:56         ` Ihor Radchenko
2022-05-04 16:49           ` Max Nikulin
2022-05-05 15:22           ` [PATCH v4] " Max Nikulin
2022-05-07  4:46             ` Ihor Radchenko
2022-07-17  8:50               ` Ihor Radchenko
2022-05-10 14:31             ` Max Nikulin
2022-05-11 13:20               ` Ihor Radchenko
2022-05-13 15:14                 ` Max Nikulin
2022-05-14  6:06                   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o80r17cv.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=manikulin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.