From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#72570: 31.0.50; Regression in date-to-time Date: Tue, 13 Aug 2024 07:55:30 +0200 Message-ID: References: <86zfpige7k.fsf@gnu.org> <892ebc72-1020-471a-bdcd-8e8da10d61dd@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37832"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 72570@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 13 07:57:02 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sdkWj-0009dz-2e for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Aug 2024 07:57:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdkWP-0006Tt-SY; Tue, 13 Aug 2024 01:56:42 -0400 Original-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 1sdkWE-0006OF-RZ for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2024 01:56:32 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdkWE-0000Jo-0c for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2024 01:56:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=l2qbb2e+p7ulILjS/Ynyk2HV7etK5QEy0jWQUVSKjmY=; b=QJKH/kslWgrQ/RFbxyZrJSrEJbXAzbl6iM/o1KXfxLrf94x2FFzUiAOxvszv154Zrrg7poV85lmsL7ZZePYeVz9UzW+2G2aY0MBnZ0q3+H7U8ChO+W2Gfh1xjtmXdwkgLh4tcjAUcXCqT0DtHMbIMY0gOo+BV+G/9w+d9HnE8VRPdqfGDruNDJ1GHzzmOr+kmp9d+EyzQOIwkGP2R0QLOt0x4j6CYKH88OON7XroL0MxtbHss6jlDQcPTVKNMVcp1pVNCD+UumOyYZdXqmdFEdU3M7NW/KFREOdBzdGC34MPSrHrLVAY9FKb/n3LHcpxmp1atVCuELLEYYTOTVvAwg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sdkWk-0004Xm-0B for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2024 01:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 13 Aug 2024 05:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72570 X-GNU-PR-Package: emacs Original-Received: via spool by 72570-submit@debbugs.gnu.org id=B72570.172352860817439 (code B ref 72570); Tue, 13 Aug 2024 05:57:01 +0000 Original-Received: (at 72570) by debbugs.gnu.org; 13 Aug 2024 05:56:48 +0000 Original-Received: from localhost ([127.0.0.1]:44333 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdkWW-0004XC-Gs for submit@debbugs.gnu.org; Tue, 13 Aug 2024 01:56:48 -0400 Original-Received: from woodpecker.gentoo.org ([140.211.166.183]:46306 helo=smtp.gentoo.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdkWT-0004Wt-Bo for 72570@debbugs.gnu.org; Tue, 13 Aug 2024 01:56:46 -0400 In-Reply-To: <892ebc72-1020-471a-bdcd-8e8da10d61dd@cs.ucla.edu> (Paul Eggert's message of "Mon, 12 Aug 2024 15:03:46 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:290065 Archived-At: >>>>> On Tue, 13 Aug 2024, Paul Eggert wrote: > As for the original issue, I tend to agree with Ulrich that > date-to-time should default to local time. This would need changes to > both documentation and to code. Ulrich mentioned the following > potential issue with this idea: >> The problem is that timezone-make-date-arpa-standard would need an >> explicit timezone as its second argument, which we don't know. > The code could use timezone-time-zone-from-absolute to infer a > timezone. timezone-fix-time already does this sort of thing. > Admittedly getting the details right could be a bit tricky, and there > is no perfect solution in this area (certainly timezone-fix-time is > flawed). It might be good enough, though. IIUC timezone-time-zone-from-absolute expects the SECONDS argument to be seconds since midnight in UTC (again, not documented). In the Europe/Berlin timezone (DST starts at 02:00 local time), I get this: (timezone-time-zone-from-absolute (timezone-absolute-from-gregorian 3 31 2024) (* 1 60 60)) (7200 "CEST") So don't we have a chicken-and-egg problem? We'd need the UTC timestamp to infer the timezone, but the timezone to calculate the timestamp?