From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#67706: 30.0.50; timer-next-integral-multiple-of-time does not account for different time-zones Date: Fri, 08 Dec 2023 21:29:56 +0200 Message-ID: <83a5qkze4r.fsf@gnu.org> References: <87msuk3obe.fsf@bboal.com> <83sf4czwwb.fsf@gnu.org> <87il583afc.fsf@bboal.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30602"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67706@debbugs.gnu.org, info@protesilaos.com To: Bruno Boal Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 08 20:31:24 2023 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 1rBgZH-0007ks-Mp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 08 Dec 2023 20:31:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBgYw-00027l-6X; Fri, 08 Dec 2023 14:31:02 -0500 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 1rBgYj-000250-Hu for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2023 14:30:56 -0500 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 1rBgYj-0000mS-6V for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2023 14:30:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rBgYw-0002cX-0F for bug-gnu-emacs@gnu.org; Fri, 08 Dec 2023 14:31:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 08 Dec 2023 19:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67706 X-GNU-PR-Package: emacs Original-Received: via spool by 67706-submit@debbugs.gnu.org id=B67706.17020638279986 (code B ref 67706); Fri, 08 Dec 2023 19:31:01 +0000 Original-Received: (at 67706) by debbugs.gnu.org; 8 Dec 2023 19:30:27 +0000 Original-Received: from localhost ([127.0.0.1]:46226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBgYM-0002b0-9m for submit@debbugs.gnu.org; Fri, 08 Dec 2023 14:30:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBgYK-0002aV-6t for 67706@debbugs.gnu.org; Fri, 08 Dec 2023 14:30:25 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBgXz-0000XG-IH; Fri, 08 Dec 2023 14:30:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/HNg1HSPA0KxripLfs+jUeBg7CRPofQPpxsySmHLAx4=; b=GJawzxD8SgbX JqFIgwL/SaH2v9/u76oLgIiQXjKsEYe1A0Nfn4X4zIQ8MjN7m6yWHu3dH3E0cpFeAK+oWhEb4cZBj 5mkf7Ih+p4PUL+RYdd7yve5NWGZlIfqzbh/QLlpcIYx3rLvcq0AcZrNjrneNNQXl/1JnVR6oiLoX6 dKsX/50FmGqxbQIoxoZ9cUQuVQ1OtPfAxP0LfVsp8h8ZjtI2rqaw0J8AHicJvTL+mIArWjiuLzsMo Fmgl+4kA93hr8kzOt5u2sW63HVOome4H1whq18ROTPvP4kDJIF3VYnzqcramIZzj3u2RbKfpKTtf4 qd1pAeSdRGd9vuNKgnd/bg==; In-Reply-To: <87il583afc.fsf@bboal.com> (message from Bruno Boal on Fri, 08 Dec 2023 16:51:03 +0000) 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:275801 Archived-At: > From: Bruno Boal > Cc: 67706@debbugs.gnu.org, info@protesilaos.com > Date: Fri, 08 Dec 2023 16:51:03 +0000 > > Eli Zaretskii writes: > > >> Cc: info@protesilaos.com > >> From: Bruno Boal > >> Date: Fri, 08 Dec 2023 11:51:01 +0000 > >> > >> While trying the following snippet in both Lisbon and Athens, we > >> get the same timer object as showed in list-timers. > >> > >> (run-at-time t 14400 #'message "Testing") > >> > >> What we would expect, is two different timer objects accounting for the > >> different time zones. > >> > >> We did a edebug and found out that the function aforementioned on the > >> subject is always returning the same value despite of the different > >> local times. > >> > >> Are we missing something obvious or is this a bug? > > > > Please show a minimal recipe, starting from "emacs -Q", to reproduce > > the issue you are seeing. I'm not sure I understand all the details, > > and therefore don't follow why you expected two objects. > > Let me try to demonstrate the possible issue. > > Running the following snippet in my PC, with Lisbon time of 16h36: > > (run-at-time t 14400 #'message "Testing") > > Checking result of `list-timers' function: > > Next Repeat Function > 3h 24m 34.7s 4h message > > Running the same snippet in Prot's PC, with Athens time of 18h36: > > (run-at-time t 14400 #'message "Testing") > > Checking result of `list-timers' function: > > Next Repeat Function > 3h 24m 34.7s 4h message > > So despite the difference of time-zones the next occurrence of Function > has the same Next time interval. Is this the expected behavior? Because > reading the documentation I would expect the Function to have a Next > interval multiple of Repeat in order to run at 20h local time of the > machine where the code was evaluated. Being this the case, the Next > value in Prot's PC would have to be 1h 24m34.7s. Sorry, I still don't follow: these are two separate systems set up with two different time zones, is that right? If so, why is it surprising that each system produces the same result in list-timers? The argument 14400 means "14400 seconds from now", and is independent of the time zone of the machine, since it's a relative time.