From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id iP6BH9MQX2aYbgEAe85BDQ:P1 (envelope-from ) for ; Tue, 04 Jun 2024 15:04:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id iP6BH9MQX2aYbgEAe85BDQ (envelope-from ) for ; Tue, 04 Jun 2024 15:04:19 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hZegi9lG; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717506259; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=kArL/W7sqNPgAP9h9CBP4tshcrvXWurEoHCMtlEV3R0=; b=GTUsC4lEB7xTACpA4dR+fsKqjX7FDib3V01fLzDOZStrjJoaGrsvcuonFpJJawjlZMKkep mvqU1mmZNhB6hcn+zklyTl68tz1m6fQBjEPAnCe0eJNHoAM0+ArdyoSjWr+zTsZWfG5HbU 9v6CKEAyoz6bXkEGqf+hfOTRCo7kpDThxxYESgmqJPdQY1Os9dLsD35BCOv029htVf3mQ/ MEQ8/iZ3XQjPat6LrxFM+Aw8DYd9l9/8P+9Y/IUSCT31Oe8S3UK5BA1+0+nJUd3JBtgiFP He+dZdV0hayEH0wCmNy+wYQREhi+ANYwRAZAdF2T1NnI0hz1luNRZ2KJCSqRLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hZegi9lG; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717506259; a=rsa-sha256; cv=none; b=sYD/81XbmQVrPdd45cCOq1TCjgkKRpnbvMowe7VNG7bjHBkOtbF94kdo5J59flZNWlXmCU an3CVPqrJO/Bf/pW/i8yVfhxR5OGmDjRXB/SXWKAlDa/AJlG8WLLRNJPPMxIkBbUJkxGwh azv8QE+PmPTTHvqXBZEvtgRnoQtYXMAyI6JmMDsV19uCaw0jcQf8Z3ZHevXO8q0sxhUBSX WlTRKeXsCyrKskc329cSJb6rYFeFPqzJKa6TKH3r1oaS6ADMt2YHRJxdfN1AANzZwLWUry fQ6bCBmtRzyL/tBH6ov0AI7GkNmb0i+32RsY3ndbUcOBx9lsE0sSP5/BoQdzUw== 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 09D6C6A9BD for ; Tue, 4 Jun 2024 15:04:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sETom-0002JS-LI; Tue, 04 Jun 2024 09:03:12 -0400 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 1sEToZ-0002D4-H4 for emacs-orgmode@gnu.org; Tue, 04 Jun 2024 09:03:01 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEToV-0001vh-PY for emacs-orgmode@gnu.org; Tue, 04 Jun 2024 09:02:59 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 780C4240029 for ; Tue, 4 Jun 2024 15:02:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1717506167; bh=NF5j6P17+WXL6Ddx7QdSUYMKwxo5OsseayX19PYKXVs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=hZegi9lGVe/XQvznfDcuK8co/WVU52NUUek8u3XUGLN2EthVuxtvMlzAuNgx9Tszy r/8k/WR5xWDHkZQOL5XylXM5kSjs7sa71WdBEOGR/cUzPs7P3OfA43KM2PAaYnj/vQ 9o1lSBm7++HWTJXV3C91XpOWLxucAhDe8kQ2Ra9t0YtWo/eeStDHK9oZCSw2NWbgEU 4yMP3haiwtIeG7bQzVu2ViVGrk9RqbkJueJOyCZ5CJ7Xevbrhc9Mk++KpamfrQTm7B UupwwrlOvMnBLITl3Q3bXo6bUBHa1sw4Se/xzhGLC7cpyjBrm6yY81CyJDdWhAEKyp p2HEdjpuqs5tg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VtrNk5h59z6tvq; Tue, 4 Jun 2024 15:02:46 +0200 (CEST) From: Ihor Radchenko To: Kyle Meyer Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org-test: Fix zone-dependent miscalculation of days of week In-Reply-To: <87sext32hv.fsf@kyleam.com> References: <87le3o5ogg.fsf@kyleam.com> <87y17mm5pz.fsf@localhost> <87sext32hv.fsf@kyleam.com> Date: Tue, 04 Jun 2024 13:04:30 +0000 Message-ID: <87frtsuae9.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.56 X-Spam-Score: -9.56 X-Migadu-Queue-Id: 09D6C6A9BD X-Migadu-Scanner: mx13.migadu.com X-TUID: sZVKGmYGvuxE Kyle Meyer 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 . Support Org development at , or support my work at