From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EJ6hDxscyWOyXQAAbAwnHQ (envelope-from ) for ; Thu, 19 Jan 2023 11:31:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AEiUDxscyWMIxAAA9RJhRA (envelope-from ) for ; Thu, 19 Jan 2023 11:31:55 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 01BDB2DF3D for ; Thu, 19 Jan 2023 11:31:54 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pISCZ-0007OR-4O; Thu, 19 Jan 2023 05:31:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pISCJ-0007EA-0Y for emacs-orgmode@gnu.org; Thu, 19 Jan 2023 05:31:08 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pISCE-0002JD-Pq for emacs-orgmode@gnu.org; Thu, 19 Jan 2023 05:31:06 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 83E18240879 for ; Thu, 19 Jan 2023 11:30:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1674124257; bh=rJ+rjnH3mdkbKBHcpC3XgcHtGnMO0xk7xXmv6Ox2O00=; h=From:To:Cc:Subject:Date:From; b=QYwoIawuLCldi7DhvVdrKOqbgzOsWsZZTl14Dw6VDQfZrtJkiM9tPucqCjZbNg/0f qhZ9kKc8oLy2/r30WreroAtYRUWQwqC22OJfaEBtL+1KZLYKoFWBfInxCYrxJK/dr+ kmBTruqdZO4L5lPr2hrRF5qzIkDqPrj0FlHoP5nxV0Xv0w38nXOEQfIYC8e7AvyjTN 4J+4cwNLG2fcV90BNjO76s9Kk5HGnWRsI0npg7hTou08usx9az8agqHbcn96WyBnxc FxAZdYpbM+qBLMgDthfVv2YfkjgfXOQb9T4fmF9y07Oi3b7uzdoMdlRY4rqQ4Q9RcT KDWdzSY2k7Obg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NyJnD4PQ7z6tmK; Thu, 19 Jan 2023 11:30:56 +0100 (CET) From: Ihor Radchenko To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: Observation of hysteresis in a GNU libc time conversion function In-Reply-To: References: <871qns88xf.fsf@localhost> Date: Thu, 19 Jan 2023 10:31:19 +0000 Message-ID: <87zgae4xzc.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674124315; a=rsa-sha256; cv=none; b=XNYxHnzF1jVLMrDcO09v41T4H3ogyrE/Af4aXvMeIyZ0Pmpi6zdDua8DxEFU3oHeY97VNK IhyoaG1420rQX5w0Oz10GTAWi1wnyORgIdg5fAlvXmTVjK7btYNHCtm7T5HRVynkuSs0sH q9OQN4q4CPelq9G4t4HhqqfmYSb3Yny6wtdba3400uqSJ/rjIBAG2RpJJIjYxDaqfHUWSY uUQ8TfHVnb58jMCwFE08dJhpL2jlnqRl4ICNOd/R6ADJuP7M7+iris24CADevRrn5SOJm+ f0XjYRsLiefgiW6rOQYWTiPFwcldC3CmoeYsbggwiS6f34MZdJIcOctiCXmPFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QYwoIawu; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674124315; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=PRK8LXLcXldsvsBeRisypoYUEuxW2kd9ls43CtHr5oI=; b=SEI7x4xwB6OLkrMyRqJPzihlwNUuv8J9YiLyKRhkvi4ru4MsBOO5IEcAk3+9GbCl6BVaYW L0Am9cwunDVp7MlE+3mIwRZrxvxgnn+AD6cQr6gVbKgaVhS8z+bl854/Ex9eKTE2jwAzQc PIxopMMjuIPgkuB9IhX2QzPD0T8ZGMvGGCbWNjaGOzENz/tpb0DJc9qke8RGNDq2K+v2D6 61nTEVve4SCZkCfzFXmi7X/IQ1sm8ICPsjTSeRGPWayyPWAvqnX6sFM2/n5nha23Zlbf0B EpfomfakptaBNBJr+VIrC35fjBRiA/P2z/LiFpxGJWP59PKAWCVHXNqoIIqQ/g== X-Spam-Score: -7.68 X-Migadu-Queue-Id: 01BDB2DF3D Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QYwoIawu; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -7.68 X-TUID: r3+2KGw4AyuP Max Nikulin writes: >> Also, see >> https://stackoverflow.com/questions/20104531/weird-mktime-logic-with-neg= ative-seconds > > My expectation is that =C2=B11 day (or month) should preserve local time= =20 > hours (e.g. 11:00 CET -> 11:00 CEST) if such moment of time exists. =C2= =B124=20 > hours, =C2=B124*60 minutes, =C2=B124*3600 seconds across DST change shoul= d cause=20 > appropriate shift of hours (e.g. 11:00 -> 12:00 is possible). > > Moreover "out of range" month day 0 is the only way to specify last=20 > month day to get > > Jan, 31 <- 1 month -> Feb, 28 (or 29) <- 1 month -> Mar, 31 > > arithmetic. Can we expect the same to work on Windows? If so, maybe we don't need all the dancing around rounding off in `org-timestamp-change' and instead simply use time API? Re: 11:00 CET -> 11:00 CEST Note that Org does not exactly offer much of convenience even without considering TZ. <2023-01-31 Thu +1m> -> <2023-03-03 Fri +1m> And nobody really complained so far. So, maybe we don't even need to care about these subtleties in practice? --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at