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 ms0.migadu.com with LMTPS id wNvwEwPiRWI3TwEAgWs5BA (envelope-from ) for ; Thu, 31 Mar 2022 19:16:51 +0200 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 KOVKEQPiRWIZdgAA9RJhRA (envelope-from ) for ; Thu, 31 Mar 2022 19:16:51 +0200 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 E100AF5CD for ; Thu, 31 Mar 2022 19:16:50 +0200 (CEST) Received: from localhost ([::1]:52260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nZyPh-00083G-NQ for larch@yhetil.org; Thu, 31 Mar 2022 13:16:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZy7Z-0000iP-A2 for emacs-orgmode@gnu.org; Thu, 31 Mar 2022 12:58:06 -0400 Received: from [2a00:1450:4864:20::229] (port=47078 helo=mail-lj1-x229.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nZy7X-0000wE-NB for emacs-orgmode@gnu.org; Thu, 31 Mar 2022 12:58:05 -0400 Received: by mail-lj1-x229.google.com with SMTP id a30so526738ljq.13 for ; Thu, 31 Mar 2022 09:58:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=TJuBAGX3ad8HFhZLw7CgBfwpvCXvcWoK82CGk5cYK1E=; b=GjRayohcxHoZgmX5DNX3YDnl4hkCj+TTkaCq1pRfzpx1U4l/Cegs8Q+3WqQhyIjQ+e gk1KwnDjTJagIBaQRLJB+zVlrPO0GZdDDLLrXAWBZ3/Mel8qOLWJXEq/OIz9bludqNA5 V9VcqXM1pTdm6sGJqoYQ1hoFKh+xjHFDX2GYlHM+qq6goAyfPijzDFD4U5Q3L+4SGkJ+ sL6WLXZf0ivtzdWRdISVN8xLi/N1P67qmIRGFFg+N6EC6AsGDkXQXr2T8QkLdwfjgKP6 Q5RwGLNiTDFrrcUVBlbkErpPI/1LDLh/+UwVmlOHJZTh6opLZS5Qi7uVz7hnAnUvyUWW 4Ajw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:message-id:date:mime-version:user-agent :subject:content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=TJuBAGX3ad8HFhZLw7CgBfwpvCXvcWoK82CGk5cYK1E=; b=vza/AxJFbFVaWNUFGKrV46FCWLSauZkY0ch7KpImvmbSl6qqFUJkPflfiTpsZ0OqmN kehAmkIMBvObZJbnaHje6xO08/HQQkS9eSRdhLYU9CfkVlPA78XJpzL1WDiqAlMfF/oY hAN3Ag8MUIlut0AVDbg3aABBLDNpzZpHDuYjYmYmVTw/1aZnxlEbhqza77BzEpaoYVsC pMPSNgM6rcSb3Q3nMhyZSRAoIH9t/q5NvPdnCbiw4aSjM+SFsu7kSx0Mvf1YfMTU8BuA gdcDm/FFwX/Udw1i0Kcg/lILXXIzfOPirPWtLHLfemNRD9PfKHtRci84GA/hUM9dx2cf 5PDA== X-Gm-Message-State: AOAM532V1hcg9hetFHlg6Yo18hZ44erCx0ZWRB/aiMEPFGJp18ReLFND jlmCO6JXSl1QDdXj3QltAZbk48qPVGE= X-Google-Smtp-Source: ABdhPJxx60pGY20fHT7X9w8SQbk+gW4Ysmu8eEQcTbE6ApNTVmPfRBbsEvmxBUQps1P/fP5uBDmj0g== X-Received: by 2002:a2e:7316:0:b0:24a:f59a:3c06 with SMTP id o22-20020a2e7316000000b0024af59a3c06mr3819029ljc.294.1648745878911; Thu, 31 Mar 2022 09:57:58 -0700 (PDT) Received: from [192.168.0.101] (nat-0-0.nsk.sibset.net. [5.44.169.188]) by smtp.googlemail.com with ESMTPSA id h16-20020ac25d70000000b00445c231e814sm2718643lft.144.2022.03.31.09.57.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 31 Mar 2022 09:57:57 -0700 (PDT) Message-ID: <20e6f6ec-de72-fcdf-87a6-717efec931d1@gmail.com> Date: Thu, 31 Mar 2022 23:57:55 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [BUG] org-agenda thinks timestamps after 23:00 correspond to the next day [9.5.2 (release_9.5.2-25-gaf6f12 @ /home/ignacio/repos/emacs/lisp/org/)] Content-Language: en-US To: Kyle Meyer References: From: Max Nikulin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::229 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=manikulin@gmail.com; helo=mail-lj1-x229.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: emacs-orgmode@gnu.org Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648747011; 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=TJuBAGX3ad8HFhZLw7CgBfwpvCXvcWoK82CGk5cYK1E=; b=UcrG9GxzmPQ9IKdmN9nq9ZpaKl2KK+jYyFYNtbvoHiWW/6MiWTdQT7Q9Mcn4v2rMdXYsr5 sGRBUWe1i6oYnfemrjfBx4RkxX5XNqqmpsPulRXU2H2mzILLgHInxfOZ6EHaywOT8N7qiy OGs15CjJriEXp1lS4qUEBiZM2js0UF6cwU34Mznu8BU4A9I1+nDsV7EDecf25dOv3j7DO8 IDJiysPk1zM3dF2t1CEtcJW8HnlG3X0AL9guwiPdBZ8/QqhRNniDrztaZf01YxviOXUWq+ /QjgH3UQbFsAFg+Z4feYQld5z4nRjkVMCH2DsFBBZ/Kjgbnior0Pn6xLUg0k4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648747011; a=rsa-sha256; cv=none; b=QyyCIEM5/B3i+b8lLiu3MWrvDSTX9YLKztNBda8HaqGtRCC7dULHdqOT0cHMczc5DDZ9hh S38kiXklsH/NUOVH+wCHl5XPnVSuJDAajdovjQuq30lIlOqvYmZYb2C5Yhz4Qh5SOtqRat dNxaDz8KJ4qrWZfGMaIufPcedndWIOPPMoeeV3qwpmIaP7tfYGIIPLW4Ocu+VVUxwyIKC8 0W2LOOG00uynDVNsbCHK/iB+XREE054O6ZZ+d4/A8e+0OiqoDY/siIq6lUEucXsjSZV4So V8nBtmSL8nezh8FbW8EPXfOFESIgZVOJF+4/3hR7CvwU0CXiyly6QkynV3FbBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=GjRayohc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Spam-Score: 8.63 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=GjRayohc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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-Queue-Id: E100AF5CD X-Spam-Score: 8.63 X-Migadu-Spam: Yes X-Migadu-Scanner: scn0.migadu.com X-TUID: HAJUyN0NJ5Cz Confirmed Emacs copy of Org changed the way of calling `encode-time' as a result interpretation of last nils returned by `org-parse-string' altered from ignored to "no DST". Kyle, be aware of the conflict with `org-time-string-to-time' when you will port emacs commit dd0727e1ec1f535b9b06be88173b4d3ccd55abcb Paul Eggert Thu Dec 16 09:40:21 2021 -0800 encode-time simplifications I hope, it is safe to pad `org-parse-time-string' return value with nil -1 nil instead of nil nil nil, but I have not tried to run tests (if they exist). New calling convention for `encode-time' exists since emacs-27.1, so it is incompatible with yet supported emacs-26. It is unfortunate that sources in Org and in Emacs repository diverged, but I am unsure if it reasonable to introduce a new compatibility wrapper. Emacs developer may be unhappy if the change will be reverted to way deprecated way to call `encode-time'. For almost a year I am reading messages here that Emacs-28 is about to be released, so Emacs-26 is almost unsupported in Org. On 31/03/2022 21:11, Ignacio Casso wrote: >> >> Could you, please, try >> >> (encode-time '(0 0 23 29 3 2022 nil -1 nil)) > > Thanks. Using -1 as DST argument indeed fixes it. > > However, while testing that, I've realized that I made a mistake in the > bug report. `encode-time' and `org-parse-time-string' return the same > both in old and current Emacs and org-mode versions (by old Emacs I mean > Emacs 27, not 26). The problem is that in ELPA's org-mode, > `org-time-string-to-time' is defined as > > (apply #'encode-time (org-parse-time-string s))) > > and in org-mode's built-in version of Emacs 29, it is defined as > > (encode-time (org-parse-time-string s))) Thank you, Ignacio. I read the code of `encode-time' once more and see that the DST argument is taken into account only when date-time fields are passed as a list. It explains change of behavior despite of absence of apparent recent changes in the code of the function. > and those two return different things. In the second case, the actual > three last elements of the list returned by `org-parse-time-string' are > used, and they are all nil. In the first case, according to the > docstring of `encode-time', the last two elements of the list are > ignored and -1 and nil are used as default. > >> If my guess is right, `org-parse-time-string' should add -1 instead of >> nil in that position. > > So your guess is right, and doing this would restore the previous > behavior. However, the curious things is that in the org-mode repository > at git://git.savannah.gnu.org/emacs/org-mode.git, > `org-time-string-to-time' still uses `apply', and always has. The > change, and thus the bug, was only introduced directly in Emacs 29 a few > months ago. > > So I guess this is an Emacs 29 bug? I didn't know the two repositories > could diverge like that. Should I report it to Emacs 29 maintainers? > Or can org-mode maintainers fix it in the Emacs repository? The problem is a consequence of grep-refactoring of Emacs code, but likely it should be fixed at the Org side.