From unknown Fri Aug 15 03:56:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23600 <23600@debbugs.gnu.org> To: bug#23600 <23600@debbugs.gnu.org> Subject: Status: 25.1.50; encode-time returns wrong result Reply-To: bug#23600 <23600@debbugs.gnu.org> Date: Fri, 15 Aug 2025 10:56:38 +0000 retitle 23600 25.1.50; encode-time returns wrong result reassign 23600 emacs submitter 23600 Kazuhiro Ito severity 23600 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 18:11:26 2016 Received: (at submit) by debbugs.gnu.org; 22 May 2016 22:11:26 +0000 Received: from localhost ([127.0.0.1]:33112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4bao-0002r6-AM for submit@debbugs.gnu.org; Sun, 22 May 2016 18:11:26 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57244) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b4bam-0002qt-Rj for submit@debbugs.gnu.org; Sun, 22 May 2016 18:11:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4bag-00088U-DL for submit@debbugs.gnu.org; Sun, 22 May 2016 18:11:19 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:59119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4bag-00088N-9w for submit@debbugs.gnu.org; Sun, 22 May 2016 18:11:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4bae-0004r6-74 for bug-gnu-emacs@gnu.org; Sun, 22 May 2016 18:11:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4baZ-00087v-W7 for bug-gnu-emacs@gnu.org; Sun, 22 May 2016 18:11:15 -0400 Received: from mail-ae1-f2.auone-net.jp ([106.187.231.2]:54835 helo=dmta02.auone-net.jp) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4baZ-00087i-NV for bug-gnu-emacs@gnu.org; Sun, 22 May 2016 18:11:11 -0400 Received: from amlmta040.auone-net.jp (amlmta040-MM [10.188.22.137]) by dmta02.auone-net.jp (au one net mail) with ESMTP id 93D66400233 for ; Mon, 23 May 2016 07:11:07 +0900 (JST) Received: from kzhr.d1.dion.ne.jp ([101.140.160.63]) by amlmta040.auone-net.jp id 57422e7b00033f8d000036430000364c300001ccdbca; Mon, 23 May 2016 07:11:07 +0900 Date: Mon, 23 May 2016 07:10:54 +0900 Message-ID: <86oa7xaglt.wl--xmue@d1.dion.ne.jp> From: Kazuhiro Ito To: bug-gnu-emacs@gnu.org Subject: 25.1.50; encode-time returns wrong result X-Hashcash: 1:20:160522:bug-gnu-emacs@gnu.org::UjnLMC8zGbSrybnI:00000000000000000000000000000000000000008xlF User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-MXM-DELIVERY-TYPE: 3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) When I evaluate the below code on Emacs (trunk, MSYS2), it returns wrong result. (list ;; local time-zone is JST-9 in my environment. (encode-time 0 02 23 22 5 2016 nil) (encode-time 0 02 23 22 5 2016 '(32400 "JST")) (encode-time 0 02 23 22 5 2016 32400)) -> ((22337 48088) (22338 11352) (22338 43752)) The first element of the result depends on local time-zone. But the second and the last element should be (22337 48088). -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 04:20:01 2016 Received: (at 23600) by debbugs.gnu.org; 1 Jun 2016 08:20:01 +0000 Received: from localhost ([127.0.0.1]:49052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b81Nh-0000Cv-9c for submit@debbugs.gnu.org; Wed, 01 Jun 2016 04:20:01 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34377) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b81Nf-0000CZ-0p for 23600@debbugs.gnu.org; Wed, 01 Jun 2016 04:19:59 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id F34251613B6; Wed, 1 Jun 2016 01:19:51 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id n5WDt6e6tGRh; Wed, 1 Jun 2016 01:19:51 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 24B0B1613FF; Wed, 1 Jun 2016 01:19:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JAOl9IBqsmB6; Wed, 1 Jun 2016 01:19:51 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EF20E1613B6; Wed, 1 Jun 2016 01:19:50 -0700 (PDT) To: Kazuhiro Ito From: Paul Eggert Subject: Re: 25.1.50; encode-time returns wrong result Organization: UCLA Computer Science Department Message-ID: <574E9AA6.1070606@cs.ucla.edu> Date: Wed, 1 Jun 2016 01:19:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000507040808030703020904" X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) This is a multi-part message in MIME format. --------------000507040808030703020904 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Thanks for the bug report. This appears to be due to an incompatibility b= etween=20 MS-Windows and POSIX that I didn't know about. Please try the attached pa= tch. I=20 have not tested or installed this (I don't use MS-Windows). --------------000507040808030703020904 Content-Type: text/x-diff; name="0001-Port-angle-bracket-TZ-settings-to-MS-Windows.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Port-angle-bracket-TZ-settings-to-MS-Windows.patch" =46rom fef3119fc136889673a1a032ee0a5a47584a03fe Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 1 Jun 2016 01:09:42 -0700 Subject: [PATCH] Port angle-bracket TZ settings to MS-Windows * doc/lispref/os.texi (Time Zone Rules): Document MS-Windows lack of support for numeric time zone abbreviations. * src/w32.c (sys_putenv): Convert angle-bracket TZ syntax to MS-compatible syntax if possible, and to "ZZZ" otherwise. Problem reported by Kazuhiro Ito (Bug#23600). --- doc/lispref/os.texi | 3 ++- src/w32.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index becb691..38dde26 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -1327,7 +1327,8 @@ Time Zone Rules a string, the conversion uses the time zone rule equivalent to setting @env{TZ} to that string. If it is an integer @var{offset}, the conversion uses a fixed time zone with the given offset and a numeric -abbreviation. If it is a list (@var{offset} @var{abbr}), where +abbreviation on POSIX-compatible platforms and an unspecified abbreviati= on +on MS-Windows. If it is a list (@var{offset} @var{abbr}), where @var{offset} is an integer number of seconds east of Universal Time and @var{abbr} is a string, the conversion uses a fixed time zone with the given offset and abbreviation. diff --git a/src/w32.c b/src/w32.c index 442ce79..71a38b9 100644 --- a/src/w32.c +++ b/src/w32.c @@ -2505,6 +2505,35 @@ sys_putenv (char *str) return unsetenv (str); } =20 + if (strncmp (str, "TZ=3D<", 4) =3D=3D 0) + { + /* MS-Windows does not support POSIX.1-2001 angle-bracket TZ + abbreviation syntax. Convert to POSIX.1-1988 syntax if possible, + and to the undocumented placeholder "ZZZ" otherwise. */ + bool supported_abbr =3D true; + for (char *p =3D str + 4; *p; p++) + { + if (('0' <=3D *p && *p <=3D '9') || *p =3D=3D '-' || *p =3D=3D '+') + supported_abbr =3D false; + else if (*p =3D=3D '>') + { + ptrdiff_t abbrlen; + if (supported_abbr) + { + abbrlen =3D p - (str + 4); + memmove (str + 3, str + 4, abbrlen); + } + else + { + abbrlen =3D 3; + memset (str + 3, 'Z', abbrlen); + } + memmove (str + 3 + abbrlen, p + 1, strlen (p)); + break; + } + } + } + return _putenv (str); } =20 --=20 2.7.4 --------------000507040808030703020904-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 04:21:38 2016 Received: (at control) by debbugs.gnu.org; 1 Jun 2016 08:21:39 +0000 Received: from localhost ([127.0.0.1]:49056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b81PG-0000Fp-OM for submit@debbugs.gnu.org; Wed, 01 Jun 2016 04:21:38 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b81PF-0000Fd-Jg for control@debbugs.gnu.org; Wed, 01 Jun 2016 04:21:37 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4D2DF1613B6 for ; Wed, 1 Jun 2016 01:21:32 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QfExijZr3-qe for ; Wed, 1 Jun 2016 01:21:30 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9FCA51613FF for ; Wed, 1 Jun 2016 01:21:30 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ua0f-bkoF6_J for ; Wed, 1 Jun 2016 01:21:30 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 853381613B6 for ; Wed, 1 Jun 2016 01:21:30 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: 23600 has a patch Organization: UCLA Computer Science Department Message-ID: <574E9B0A.5090508@cs.ucla.edu> Date: Wed, 1 Jun 2016 01:21:30 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) tags 23600 patch From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 01 21:54:52 2016 Received: (at 23600) by debbugs.gnu.org; 2 Jun 2016 01:54:52 +0000 Received: from localhost ([127.0.0.1]:50327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8HqW-0004Rg-IF for submit@debbugs.gnu.org; Wed, 01 Jun 2016 21:54:52 -0400 Received: from mail-ae1-f7.auone-net.jp ([106.187.231.7]:44411 helo=dmta01.auone-net.jp) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8HqU-0004RX-VF for 23600@debbugs.gnu.org; Wed, 01 Jun 2016 21:54:51 -0400 Received: from amlmta035.auone-net.jp (amlmta035-MM [10.188.22.67]) by dmta01.auone-net.jp (au one net mail) with ESMTP id 889F15601F0 for <23600@debbugs.gnu.org>; Thu, 2 Jun 2016 10:54:47 +0900 (JST) Received: from kzhr.d1.dion.ne.jp ([49.239.76.212]) by amlmta035.auone-net.jp id 574f91e60002f99500007a65000051c0200002b3e264; Thu, 02 Jun 2016 10:54:46 +0900 Date: Thu, 02 Jun 2016 02:54:43 +0100 Message-ID: <86zir4e4nw.wl--xmue@d1.dion.ne.jp> From: Kazuhiro Ito To: Paul Eggert Subject: Re: 25.1.50; encode-time returns wrong result In-Reply-To: <574E9AA6.1070606@cs.ucla.edu> References: <574E9AA6.1070606@cs.ucla.edu> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-MXM-DELIVERY-TYPE: 3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > Thanks for the bug report. This appears to be due to an incompatibility > between MS-Windows and POSIX that I didn't know about. Please try the > attached patch. I have not tested or installed this (I don't use > MS-Windows). Thank you for the fix. The problem I showed in the bug report seems to be resolved. But there still be a problem related timezone (I dont' know whether it is the same problem). With your patch, the below code returns unexpected result. (list (progn (set-time-zone-rule 0) (current-time-zone)) (progn (set-time-zone-rule "JST-9") (current-time-zone)) (progn (set-time-zone-rule "-9") (current-time-zone))) -> ((0 "ZZZ") (0 "ZZZ") (32400 "JST")) I want it to return '((0 "ZZZ") (32400 "JST") (32400 "JST"))'. -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 02:38:32 2016 Received: (at 23600) by debbugs.gnu.org; 2 Jun 2016 06:38:32 +0000 Received: from localhost ([127.0.0.1]:50414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8MH2-0007lY-68 for submit@debbugs.gnu.org; Thu, 02 Jun 2016 02:38:32 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8MH0-0007lL-OD for 23600@debbugs.gnu.org; Thu, 02 Jun 2016 02:38:31 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9C05F1613DC; Wed, 1 Jun 2016 23:38:24 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id x5zEt-l8urLO; Wed, 1 Jun 2016 23:38:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E7EB4161412; Wed, 1 Jun 2016 23:38:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IkorbCqrWPpo; Wed, 1 Jun 2016 23:38:23 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id C84BC1613DC; Wed, 1 Jun 2016 23:38:23 -0700 (PDT) Subject: Re: 25.1.50; encode-time returns wrong result To: Kazuhiro Ito References: <574E9AA6.1070606@cs.ucla.edu> <86zir4e4nw.wl--xmue@d1.dion.ne.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <574FD45F.7060806@cs.ucla.edu> Date: Wed, 1 Jun 2016 23:38:23 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <86zir4e4nw.wl--xmue@d1.dion.ne.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Kazuhiro Ito wrote: > Thank you for the fix. The problem I showed in the bug report seems > to be resolved. Thanks, I installed the fix in master. > But there still be a problem related timezone (I > dont' know whether it is the same problem). With your patch, the > below code returns unexpected result. > > (list (progn (set-time-zone-rule 0) > (current-time-zone)) > (progn (set-time-zone-rule "JST-9") > (current-time-zone)) > (progn (set-time-zone-rule "-9") > (current-time-zone))) > > -> ((0 "ZZZ") (0 "ZZZ") (32400 "JST")) > > I want it to return '((0 "ZZZ") (32400 "JST") (32400 "JST"))'. Yes, that's the correct result and it's what I observe on Ubuntu 16.04 x8= 6-64. I=20 don't offhand see how the just-installed patch would cause the wrong answ= er for=20 the "JST-9" case, as the patch cannot make a difference unless TZ's value= starts=20 with "<". Do you see the same (wrong) behavior for "JST-9" in the emacs-25 branch? = In=20 Emacs 24.5? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 02 10:52:08 2016 Received: (at control) by debbugs.gnu.org; 2 Jun 2016 14:52:08 +0000 Received: from localhost ([127.0.0.1]:51882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8Tyh-0004Mj-VF for submit@debbugs.gnu.org; Thu, 02 Jun 2016 10:52:08 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:48834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b8Tyf-0004ME-QH for control@debbugs.gnu.org; Thu, 02 Jun 2016 10:52:06 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 093DF161419 for ; Thu, 2 Jun 2016 07:51:59 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7A8TxlqdFAq0 for ; Thu, 2 Jun 2016 07:51:58 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 60AB2161417 for ; Thu, 2 Jun 2016 07:51:58 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bgT-7q9dCr44 for ; Thu, 2 Jun 2016 07:51:58 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 48BA116140F for ; Thu, 2 Jun 2016 07:51:58 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: 23600 patch applied, but still might need work Organization: UCLA Computer Science Department Message-ID: <891de95d-5dcc-2a44-1037-3c34dc6ce450@cs.ucla.edu> Date: Thu, 2 Jun 2016 07:51:58 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) tags 23600 - patch tags 23600 moreinfo From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 11:51:33 2016 Received: (at 23600) by debbugs.gnu.org; 4 Jun 2016 15:51:33 +0000 Received: from localhost ([127.0.0.1]:54520 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9DrJ-0006OA-8F for submit@debbugs.gnu.org; Sat, 04 Jun 2016 11:51:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9DrH-0006Ny-SW for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 11:51:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9Dr8-0000pK-Ut for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 11:51:26 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40104) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9Dr8-0000pF-RX; Sat, 04 Jun 2016 11:51:22 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2817 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9Dr7-0000CJ-1U; Sat, 04 Jun 2016 11:51:21 -0400 Date: Sat, 04 Jun 2016 18:51:50 +0300 Message-Id: <83h9d9uf3d.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <574E9AA6.1070606@cs.ucla.edu> (message from Paul Eggert on Wed, 1 Jun 2016 01:19:50 -0700) Subject: Re: 25.1.50; encode-time returns wrong result References: <574E9AA6.1070606@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Cc: 23600@debbugs.gnu.org, Eli Zaretskii > From: Paul Eggert > Date: Wed, 1 Jun 2016 01:19:50 -0700 > > + if (strncmp (str, "TZ=<", 4) == 0) > + { > + /* MS-Windows does not support POSIX.1-2001 angle-bracket TZ > + abbreviation syntax. Convert to POSIX.1-1988 syntax if possible, > + and to the undocumented placeholder "ZZZ" otherwise. */ > + bool supported_abbr = true; > + for (char *p = str + 4; *p; p++) > + { > + if (('0' <= *p && *p <= '9') || *p == '-' || *p == '+') > + supported_abbr = false; > + else if (*p == '>') > + { > + ptrdiff_t abbrlen; > + if (supported_abbr) > + { > + abbrlen = p - (str + 4); > + memmove (str + 3, str + 4, abbrlen); > + } > + else > + { > + abbrlen = 3; > + memset (str + 3, 'Z', abbrlen); > + } > + memmove (str + 3 + abbrlen, p + 1, strlen (p)); > + break; > + } Do callers of putenv expect the argument to be destroyed? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 13:15:14 2016 Received: (at 23600) by debbugs.gnu.org; 4 Jun 2016 17:15:14 +0000 Received: from localhost ([127.0.0.1]:54593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9FAI-0003JR-3c for submit@debbugs.gnu.org; Sat, 04 Jun 2016 13:15:14 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35558) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9FAF-0003JB-Pe for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 13:15:12 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 04ED6161460; Sat, 4 Jun 2016 10:15:06 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hbVRRaVPu9_E; Sat, 4 Jun 2016 10:15:05 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4076E16147A; Sat, 4 Jun 2016 10:15:05 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Wwtt5oC34nA6; Sat, 4 Jun 2016 10:15:05 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 1E6D2161460; Sat, 4 Jun 2016 10:15:05 -0700 (PDT) Subject: Re: 25.1.50; encode-time returns wrong result To: Eli Zaretskii References: <574E9AA6.1070606@cs.ucla.edu> <83h9d9uf3d.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <57530C98.3030508@cs.ucla.edu> Date: Sat, 4 Jun 2016 10:15:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <83h9d9uf3d.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Eli Zaretskii wrote: > Do callers of putenv expect the argument to be destroyed? Yes and no. POSIX says that the environment can be modified in-place, so = a=20 caller of putenv (S) should be prepared for *S to be modified (which is w= hat I=20 assume you mean by "destroyed") because the string will be put into the=20 environment. Also, POSIX allows putenv to modify *S, as S is of type char= * and=20 there is no prohibition in the standard against putenv modifying the poin= ted-to=20 storage. That being said, I don't know of any POSIXish implementation of = putenv=20 (S) that modifies *S and I doubt whether any mainstream implementation wo= uld do=20 that. Although the code you mention is stretching things a bit, it's not stretc= hing=20 them beyond recognition: the intent of putenv ("TZ=3D-9") is not rea= lly "set=20 the 'TZ' value to the byte-string '-9' in the environment array", it= 's more=20 "set the time zone to 9 hours ahead of UTC and with abbreviation 'JST'", = and on=20 MS-Windows the code implements this intent more faithfully than doing not= hing would. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 13:37:24 2016 Received: (at 23600) by debbugs.gnu.org; 4 Jun 2016 17:37:24 +0000 Received: from localhost ([127.0.0.1]:54612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9FVk-0005Rl-KH for submit@debbugs.gnu.org; Sat, 04 Jun 2016 13:37:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55638) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9FVj-0005RZ-Ew for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 13:37:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9FVa-0002cH-Cp for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 13:37:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9FVa-0002cB-9r; Sat, 04 Jun 2016 13:37:14 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2880 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9FVW-0006uJ-CV; Sat, 04 Jun 2016 13:37:12 -0400 Date: Sat, 04 Jun 2016 20:37:26 +0300 Message-Id: <838tykvort.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <57530C98.3030508@cs.ucla.edu> (message from Paul Eggert on Sat, 4 Jun 2016 10:15:04 -0700) Subject: Re: 25.1.50; encode-time returns wrong result References: <574E9AA6.1070606@cs.ucla.edu> <83h9d9uf3d.fsf@gnu.org> <57530C98.3030508@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org > From: Paul Eggert > Date: Sat, 4 Jun 2016 10:15:04 -0700 > > > Do callers of putenv expect the argument to be destroyed? > > Yes and no. POSIX says that the environment can be modified in-place, so a > caller of putenv (S) should be prepared for *S to be modified (which is what I > assume you mean by "destroyed") because the string will be put into the > environment. Also, POSIX allows putenv to modify *S, as S is of type char * and > there is no prohibition in the standard against putenv modifying the pointed-to > storage. That being said, I don't know of any POSIXish implementation of putenv > (S) that modifies *S and I doubt whether any mainstream implementation would do > that. Right, that's what I thought. > Although the code you mention is stretching things a bit, it's not stretching > them beyond recognition: the intent of putenv ("TZ=-9") is not really "set > the 'TZ' value to the byte-string '-9' in the environment array", it's more > "set the time zone to 9 hours ahead of UTC and with abbreviation 'JST'", and on > MS-Windows the code implements this intent more faithfully than doing nothing would. I think it would be cleaner if we copied the string before modifying it. I will do that when I have time. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 18:18:53 2016 Received: (at 23600) by debbugs.gnu.org; 4 Jun 2016 22:18:53 +0000 Received: from localhost ([127.0.0.1]:54700 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Ju8-0008Nw-Sp for submit@debbugs.gnu.org; Sat, 04 Jun 2016 18:18:53 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Ju7-0008Nk-PC for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 18:18:52 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0A23A161467; Sat, 4 Jun 2016 15:18:45 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8fpKFdvRja98; Sat, 4 Jun 2016 15:18:44 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1813816147C; Sat, 4 Jun 2016 15:18:44 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IXR0GiMHW3de; Sat, 4 Jun 2016 15:18:44 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EED8B161467; Sat, 4 Jun 2016 15:18:43 -0700 (PDT) Subject: Re: 25.1.50; encode-time returns wrong result To: Eli Zaretskii References: <574E9AA6.1070606@cs.ucla.edu> <83h9d9uf3d.fsf@gnu.org> <57530C98.3030508@cs.ucla.edu> <838tykvort.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <575353C3.7090203@cs.ucla.edu> Date: Sat, 4 Jun 2016 15:18:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <838tykvort.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Eli Zaretskii wrote: > I think it would be cleaner if we copied the string before modifying > it. Other parts of Emacs modify the string in place and expect the modificati= ons to=20 affect the time zone setting, so in general it won't work to copy the str= ing,=20 modify the copy, and pass the copy's address to putenv. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 04 22:47:11 2016 Received: (at 23600) by debbugs.gnu.org; 5 Jun 2016 02:47:12 +0000 Received: from localhost ([127.0.0.1]:54807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9O5n-0007wZ-MF for submit@debbugs.gnu.org; Sat, 04 Jun 2016 22:47:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9O5j-0007wB-DQ for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 22:47:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9O5a-00084n-CJ for 23600@debbugs.gnu.org; Sat, 04 Jun 2016 22:47:02 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9O5a-00084j-9A; Sat, 04 Jun 2016 22:46:58 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3098 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9O5Y-0001uh-EJ; Sat, 04 Jun 2016 22:46:56 -0400 Date: Sun, 05 Jun 2016 05:47:27 +0300 Message-Id: <8337osuzb4.fsf@gnu.org> From: Eli Zaretskii To: Paul Eggert In-reply-to: <575353C3.7090203@cs.ucla.edu> (message from Paul Eggert on Sat, 4 Jun 2016 15:18:43 -0700) Subject: Re: 25.1.50; encode-time returns wrong result References: <574E9AA6.1070606@cs.ucla.edu> <83h9d9uf3d.fsf@gnu.org> <57530C98.3030508@cs.ucla.edu> <838tykvort.fsf@gnu.org> <575353C3.7090203@cs.ucla.edu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org > From: Paul Eggert > Date: Sat, 4 Jun 2016 15:18:43 -0700 > > Eli Zaretskii wrote: > > I think it would be cleaner if we copied the string before modifying > > it. > > Other parts of Emacs modify the string in place and expect the modifications to > affect the time zone setting, so in general it won't work to copy the string, > modify the copy, and pass the copy's address to putenv. Too bad. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 05 07:08:33 2016 Received: (at 23600) by debbugs.gnu.org; 5 Jun 2016 11:08:33 +0000 Received: from localhost ([127.0.0.1]:54936 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Vuz-0006RT-IA for submit@debbugs.gnu.org; Sun, 05 Jun 2016 07:08:33 -0400 Received: from mail-ae1-f4.auone-net.jp ([106.187.231.4]:34029 helo=dmta01.auone-net.jp) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Vux-0006RI-Q9 for 23600@debbugs.gnu.org; Sun, 05 Jun 2016 07:08:32 -0400 Received: from amlmta040.auone-net.jp (amlmta040-MM [10.188.22.137]) by dmta01.auone-net.jp (au one net mail) with ESMTP id 578745603B8 for <23600@debbugs.gnu.org>; Sun, 5 Jun 2016 20:08:29 +0900 (JST) Received: from kzhr.d1.dion.ne.jp ([101.140.160.63]) by amlmta040.auone-net.jp id 5754082c000877ad0000364300000cd43000027ce8f8; Sun, 05 Jun 2016 20:08:28 +0900 Date: Sun, 05 Jun 2016 20:08:22 +0900 Message-ID: <86wpm351w9.wl--xmue@d1.dion.ne.jp> From: Kazuhiro Ito To: Paul Eggert Subject: Re: 25.1.50; encode-time returns wrong result In-Reply-To: <574FD45F.7060806@cs.ucla.edu> References: <574E9AA6.1070606@cs.ucla.edu> <86zir4e4nw.wl--xmue@d1.dion.ne.jp> <574FD45F.7060806@cs.ucla.edu> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-MXM-DELIVERY-TYPE: 3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > > Thank you for the fix. The problem I showed in the bug report seems > > to be resolved. > Thanks, I installed the fix in master. Thank you. > > But there still be a problem related timezone (I > > dont' know whether it is the same problem). With your patch, the > > below code returns unexpected result. > > > > (list (progn (set-time-zone-rule 0) > > (current-time-zone)) > > (progn (set-time-zone-rule "JST-9") > > (current-time-zone)) > > (progn (set-time-zone-rule "-9") > > (current-time-zone))) > > > > -> ((0 "ZZZ") (0 "ZZZ") (32400 "JST")) > > > > I want it to return '((0 "ZZZ") (32400 "JST") (32400 "JST"))'. > Yes, that's the correct result and it's what I observe on Ubuntu 16.04 > x86-64. I don't offhand see how the just-installed patch would cause the > wrong answer for the "JST-9" case, as the patch cannot make a difference > unless TZ's value starts with "<". > > Do you see the same (wrong) behavior for "JST-9" in the emacs-25 branch? > In Emacs 24.5? Emacs 24.5 can treat "JST-9" correctly but not for "", emacs-25 shows the same result as trunk. (list (progn (set-time-zone-rule "-1") (current-time-zone)) (progn (set-time-zone-rule t) (current-time-zone)) (progn (set-time-zone-rule "BBB-2") (current-time-zone)) (progn (set-time-zone-rule 36000) (current-time-zone)) (progn (set-time-zone-rule "-9") (current-time-zone))) emacs-25 branch -> ((32400 "JST") (0 "GMT") (32400 "JST") (32400 "JST") (32400 "JST")) emacs-25 branch with sys_putenv patch and trunk -> ((3600 "AAA") (0 "GMT") (3600 "AAA") (36000 "ZZZ") (32400 "JST")) (list (progn (set-time-zone-rule "GMT0") (current-time-zone)) (progn (set-time-zone-rule "BBB-2") (current-time-zone)) (progn (set-time-zone-rule "-9") (current-time-zone))) 24.5 pre-built binary -> ((0 "GMT") (7200 "BBB") (3600 "T>-")) -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 05 11:19:45 2016 Received: (at 23600) by debbugs.gnu.org; 5 Jun 2016 15:19:45 +0000 Received: from localhost ([127.0.0.1]:55707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Zq5-0000ay-85 for submit@debbugs.gnu.org; Sun, 05 Jun 2016 11:19:45 -0400 Received: from eggs.gnu.org ([208.118.235.92]:55556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9Zq2-0000ak-Qk for 23600@debbugs.gnu.org; Sun, 05 Jun 2016 11:19:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9Zpu-0000be-AL for 23600@debbugs.gnu.org; Sun, 05 Jun 2016 11:19:37 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9Zpu-0000bX-7U; Sun, 05 Jun 2016 11:19:34 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3354 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1b9Zps-0004kB-FM; Sun, 05 Jun 2016 11:19:33 -0400 Date: Sun, 05 Jun 2016 18:20:04 +0300 Message-Id: <831t4bvf17.fsf@gnu.org> From: Eli Zaretskii To: eggert@cs.ucla.edu In-reply-to: <8337osuzb4.fsf@gnu.org> (message from Eli Zaretskii on Sun, 05 Jun 2016 05:47:27 +0300) Subject: Re: bug#23600: 25.1.50; encode-time returns wrong result References: <574E9AA6.1070606@cs.ucla.edu> <83h9d9uf3d.fsf@gnu.org> <57530C98.3030508@cs.ucla.edu> <838tykvort.fsf@gnu.org> <575353C3.7090203@cs.ucla.edu> <8337osuzb4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.4 (------) > Date: Sun, 05 Jun 2016 05:47:27 +0300 > From: Eli Zaretskii > Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org > > > Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org > > From: Paul Eggert > > Date: Sat, 4 Jun 2016 15:18:43 -0700 > > > > Eli Zaretskii wrote: > > > I think it would be cleaner if we copied the string before modifying > > > it. > > > > Other parts of Emacs modify the string in place and expect the modifications to > > affect the time zone setting, so in general it won't work to copy the string, > > modify the copy, and pass the copy's address to putenv. > > Too bad. Actually, could you point me to those places? Because if the code which expects that is not already ifdef'ed out/around for Windows, it's a problem waiting to be discovered, since MS _putenv accepts a 'const char *' argument, and my references indicate that the implementation indeed copies the input string. So those other parts of the code expect something that cannot work on Windows. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 05 21:48:39 2016 Received: (at 23600) by debbugs.gnu.org; 6 Jun 2016 01:48:39 +0000 Received: from localhost ([127.0.0.1]:56042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9jeh-0007vd-GH for submit@debbugs.gnu.org; Sun, 05 Jun 2016 21:48:39 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:46118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b9jeg-0007vS-8X for 23600@debbugs.gnu.org; Sun, 05 Jun 2016 21:48:38 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A3003161384; Sun, 5 Jun 2016 18:48:32 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 0pz_FvrGoRE3; Sun, 5 Jun 2016 18:48:32 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 02A5116139F; Sun, 5 Jun 2016 18:48:32 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Xp2h5g68lbF8; Sun, 5 Jun 2016 18:48:31 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D70CA161384; Sun, 5 Jun 2016 18:48:31 -0700 (PDT) Subject: Re: bug#23600: 25.1.50; encode-time returns wrong result To: Eli Zaretskii References: <574E9AA6.1070606@cs.ucla.edu> <83h9d9uf3d.fsf@gnu.org> <57530C98.3030508@cs.ucla.edu> <838tykvort.fsf@gnu.org> <575353C3.7090203@cs.ucla.edu> <8337osuzb4.fsf@gnu.org> <831t4bvf17.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <5754D66F.7000103@cs.ucla.edu> Date: Sun, 5 Jun 2016 18:48:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <831t4bvf17.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600 Cc: kzhr@d1.dion.ne.jp, 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Eli Zaretskii wrote: > Actually, could you point me to those places? It's emacs_setenv_TZ, in editfns.c. Ah, now I see that there's an ifdef=20 WINDOWSNT there that sidesteps the issue on MS-Windows, so you should be = OK. From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 08 16:06:56 2016 Received: (at control) by debbugs.gnu.org; 8 Jun 2016 20:06:56 +0000 Received: from localhost ([127.0.0.1]:33145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAjke-0003tN-Jm for submit@debbugs.gnu.org; Wed, 08 Jun 2016 16:06:56 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAjkd-0003t9-Jb for control@debbugs.gnu.org; Wed, 08 Jun 2016 16:06:56 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CE9C21614B8 for ; Wed, 8 Jun 2016 13:06:49 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ZwZGU-aVIcvd for ; Wed, 8 Jun 2016 13:06:49 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3B4AE1614B9 for ; Wed, 8 Jun 2016 13:06:49 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lCtmBEllO16B for ; Wed, 8 Jun 2016 13:06:49 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 253FB1614B8 for ; Wed, 8 Jun 2016 13:06:49 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: 23600 no longer needs more information Organization: UCLA Computer Science Department Message-ID: Date: Wed, 8 Jun 2016 13:06:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) tags 23600 - moreinfo From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 12 06:45:42 2016 Received: (at 23600) by debbugs.gnu.org; 12 Jun 2016 10:45:43 +0000 Received: from localhost ([127.0.0.1]:37671 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bC2ti-0004lc-NP for submit@debbugs.gnu.org; Sun, 12 Jun 2016 06:45:42 -0400 Received: from mail-ae0-f55.auone-net.jp ([106.187.230.55]:47273 helo=dmta03.auone-net.jp) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bC2tg-0004lR-LZ for 23600@debbugs.gnu.org; Sun, 12 Jun 2016 06:45:41 -0400 Received: from amlmta037.auone-net.jp (amlmta037-MM [10.188.22.95]) by dmta03.auone-net.jp (au one net mail) with ESMTP id D964EDA0099 for <23600@debbugs.gnu.org>; Sun, 12 Jun 2016 19:45:37 +0900 (JST) Received: from kzhr.d1.dion.ne.jp ([101.140.160.63]) by amlmta037.auone-net.jp id 575d3d50000c7cfe000041aa00004fd9a00002d66611; Sun, 12 Jun 2016 19:45:36 +0900 Date: Sun, 12 Jun 2016 12:45:32 +0200 Message-ID: <86twgyheib.wl--xmue@d1.dion.ne.jp> From: Kazuhiro Ito To: Paul Eggert Subject: Re: 25.1.50; encode-time returns wrong result In-Reply-To: <574FD45F.7060806@cs.ucla.edu> References: <574E9AA6.1070606@cs.ucla.edu> <86zir4e4nw.wl--xmue@d1.dion.ne.jp> <574FD45F.7060806@cs.ucla.edu> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-MXM-DELIVERY-TYPE: 3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) I noticed that calling format-time-string (or encode-time) with time-zone string fixes the problem. But I can't see why. (list (progn (set-time-zone-rule "-1") (current-time-zone)) (progn (set-time-zone-rule "BBB-2") (current-time-zone)) (progn (format-time-string "" nil "UTC0") (current-time-zone))) -> ((3600 "AAA") (3600 "AAA") (7200 "BBB")) -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 13 17:55:06 2016 Received: (at 23600) by debbugs.gnu.org; 13 Jun 2016 21:55:06 +0000 Received: from localhost ([127.0.0.1]:39377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCZp3-0003Zq-PC for submit@debbugs.gnu.org; Mon, 13 Jun 2016 17:55:05 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCZp2-0003ZI-31 for 23600@debbugs.gnu.org; Mon, 13 Jun 2016 17:55:04 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E00D9161424; Mon, 13 Jun 2016 14:54:57 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id U_UgXkn6AqUa; Mon, 13 Jun 2016 14:54:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3FBA6161446; Mon, 13 Jun 2016 14:54:57 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XXuC5_g_WX_I; Mon, 13 Jun 2016 14:54:57 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 22E08161424; Mon, 13 Jun 2016 14:54:57 -0700 (PDT) Subject: Re: 25.1.50; encode-time returns wrong result To: Kazuhiro Ito References: <574E9AA6.1070606@cs.ucla.edu> <86zir4e4nw.wl--xmue@d1.dion.ne.jp> <574FD45F.7060806@cs.ucla.edu> <86twgyheib.wl--xmue@d1.dion.ne.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <1f1d719e-dbc7-b3d9-d0f7-259a356cea3d@cs.ucla.edu> Date: Mon, 13 Jun 2016 14:54:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <86twgyheib.wl--xmue@d1.dion.ne.jp> Content-Type: multipart/mixed; boundary="------------3F953C8E498774F975BE9A47" X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) This is a multi-part message in MIME format. --------------3F953C8E498774F975BE9A47 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 06/12/2016 03:45 AM, Kazuhiro Ito wrote: > I noticed that calling format-time-string (or encode-time) with > time-zone string fixes the problem. But I can't see why. I think I see the problem, at least on GNU/Linux: localtime_r needs someone else to call tzset. I installed the attached patch into the master branch, to do that. --------------3F953C8E498774F975BE9A47 Content-Type: application/x-patch; name="0001-Call-tzset-after-setting-TZ.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Call-tzset-after-setting-TZ.patch" RnJvbSBmZjlmNzY4MjYzZWQ0MjQ0OGQ4NTI0ZGNhOGU1ODdiOTk5YmY4YjJjIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDEzIEp1biAyMDE2IDE0OjUwOjA4IC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gQ2FsbCB0enNldCBhZnRlciBzZXR0aW5nIFRaCgoqIHNyYy9lZGl0Zm5zLmMgKHR6bG9v a3VwKTogQ2FsbCB0enNldCBhZnRlciBzZXR0aW5nIFRaLCBzbyB0aGF0CnRoZSBzZXR0aW5n IGNoYW5nZSBwcm9wYWdhdGVzIGludG8gRW1hY3MgbG9jYWwgdGltZSAoQnVnIzIzNjAwKS4K KGVtYWNzX3NldGVudl9UWik6IENsYXJpZnkgY29tbWVudHMuCi0tLQogc3JjL2VkaXRmbnMu YyB8IDM0ICsrKysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0KIDEgZmlsZSBjaGFu Z2VkLCAxOCBpbnNlcnRpb25zKCspLCAxNiBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9z cmMvZWRpdGZucy5jIGIvc3JjL2VkaXRmbnMuYwppbmRleCBhNmQxMzU0Li4wYzAxYzc0IDEw MDY0NAotLS0gYS9zcmMvZWRpdGZucy5jCisrKyBiL3NyYy9lZGl0Zm5zLmMKQEAgLTIxNiw2 ICsyMTYsNyBAQCB0emxvb2t1cCAoTGlzcF9PYmplY3Qgem9uZSwgYm9vbCBzZXR0eikKICAg ICB7CiAgICAgICBibG9ja19pbnB1dCAoKTsKICAgICAgIGVtYWNzX3NldGVudl9UWiAoem9u ZV9zdHJpbmcpOworICAgICAgdHpzZXQgKCk7CiAgICAgICB0aW1lem9uZV90IG9sZF90eiA9 IGxvY2FsX3R6OwogICAgICAgbG9jYWxfdHogPSBuZXdfdHo7CiAgICAgICB0emZyZWUgKG9s ZF90eik7CkBAIC0yNDU4LDIzICsyNDU5LDI0IEBAIGVtYWNzX3NldGVudl9UWiAoY29uc3Qg Y2hhciAqdHpzdHJpbmcpCiAgICAgICB0enZhbFt0emVxbGVuXSA9IDA7CiAgICAgfQogCi0g IGlmIChuZXdfdHp2YWxidWYKLSNpZmRlZiBXSU5ET1dTTlQKLSAgICAgIC8qIE1TLVdpbmRv d3MgaW1wbGVtZW50YXRpb24gb2YgJ3B1dGVudicgY29waWVzIHRoZSBhcmd1bWVudAotCSBz dHJpbmcgaW50byBhIGJsb2NrIGl0IGFsbG9jYXRlcywgc28gbW9kaWZ5aW5nIHR6dmFsIHN0 cmluZwotCSBkb2VzIG5vdCBjaGFuZ2UgdGhlIGVudmlyb25tZW50LiAgT1RPSCwgdGhlIG90 aGVyIHRocmVhZHMgcnVuCi0JIGJ5IEVtYWNzIG9uIE1TLVdpbmRvd3MgbmV2ZXIgY2FsbCAn eHB1dGVudicgb3IgJ3B1dGVudicgb3IKLQkgJ3Vuc2V0ZW52Jywgc28gdGhlIG9yaWdpbmFs IGNhdXNlIGZvciB0aGUgZGljZXkgaW4tcGxhY2UKLQkgbW9kaWZpY2F0aW9uIHRlY2huaXF1 ZSBkb2Vzbid0IGV4aXN0IHRoZXJlIGluIHRoZSBmaXJzdAotCSBwbGFjZS4gICovCi0gICAg ICB8fCAxCisKKyNpZm5kZWYgV0lORE9XU05UCisgIC8qIE1vZGlmeWluZyAqVFpWQUwgbWVy ZWx5IHJlcXVpcmVzIGNhbGxpbmcgdHpzZXQgKHdoaWNoIGlzIHRoZQorICAgICBjYWxsZXIn cyByZXNwb25zaWJpbGl0eSkuICBIb3dldmVyLCBtb2RpZnlpbmcgVFpWQUwgcmVxdWlyZXMK KyAgICAgY2FsbGluZyBwdXRlbnY7IGFsdGhvdWdoIHRoaXMgaXMgbm90IHRocmVhZC1zYWZl LCBpbiBwcmFjdGljZSB0aGlzCisgICAgIHJ1bnMgb25seSBvbiBzdGFydHVwIHdoZW4gdGhl cmUgaXMgb25seSBvbmUgdGhyZWFkLiAgKi8KKyAgYm9vbCBuZWVkX3B1dGVudiA9IG5ld190 enZhbGJ1ZjsKKyNlbHNlCisgIC8qIE1TLVdpbmRvd3MgJ3B1dGVudicgY29waWVzIHRoZSBh cmd1bWVudCBzdHJpbmcgaW50byBhIGJsb2NrIGl0CisgICAgIGFsbG9jYXRlcywgc28gbW9k aWZ5aW5nICpUWlZBTCB3aWxsIG5vdCBjaGFuZ2UgdGhlIGVudmlyb25tZW50LgorICAgICBI b3dldmVyLCB0aGUgb3RoZXIgdGhyZWFkcyBydW4gYnkgRW1hY3Mgb24gTVMtV2luZG93cyBu ZXZlciBjYWxsCisgICAgICd4cHV0ZW52JyBvciAncHV0ZW52JyBvciAndW5zZXRlbnYnLCBz byB0aGUgb3JpZ2luYWwgY2F1c2UgZm9yIHRoZQorICAgICBkaWNleSBpbi1wbGFjZSBtb2Rp ZmljYXRpb24gdGVjaG5pcXVlIGRvZXNuJ3QgZXhpc3QgdGhlcmUgaW4gdGhlCisgICAgIGZp cnN0IHBsYWNlLiAgKi8KKyAgYm9vbCBuZWVkX3B1dGVudiA9IHRydWU7CiAjZW5kaWYKLSAg ICAgICkKLSAgICB7Ci0gICAgICAvKiBBbHRob3VnaCB0aGlzIGlzIG5vdCB0aHJlYWQtc2Fm ZSwgaW4gcHJhY3RpY2UgdGhpcyBydW5zIG9ubHkKLQkgb24gc3RhcnR1cCB3aGVuIHRoZXJl IGlzIG9ubHkgb25lIHRocmVhZC4gICovCi0gICAgICB4cHV0ZW52ICh0enZhbCk7Ci0gICAg fQorICBpZiAobmVlZF9wdXRlbnYpCisgICAgeHB1dGVudiAodHp2YWwpOwogCiAgIHJldHVy biAwOwogfQotLSAKMi41LjUKCg== --------------3F953C8E498774F975BE9A47-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 10:06:03 2016 Received: (at 23600) by debbugs.gnu.org; 14 Jun 2016 14:06:03 +0000 Received: from localhost ([127.0.0.1]:40730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCoyh-0007ub-Ah for submit@debbugs.gnu.org; Tue, 14 Jun 2016 10:06:03 -0400 Received: from mail-ae0-f63.auone-net.jp ([106.187.230.63]:57799 helo=dmta03.auone-net.jp) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCoyf-0007uA-Pr for 23600@debbugs.gnu.org; Tue, 14 Jun 2016 10:06:02 -0400 Received: from amlmta301.auone-net.jp (amlmta301-MM [10.188.22.193]) by dmta03.auone-net.jp (au one net mail) with ESMTP id 51CAFDA02E7 for <23600@debbugs.gnu.org>; Tue, 14 Jun 2016 23:05:59 +0900 (JST) Received: from kzhr.d1.dion.ne.jp ([101.140.160.63]) by amlmta301.auone-net.jp id 57600f45000b6d3200001b8300000bc6280002aed34e; Tue, 14 Jun 2016 23:05:57 +0900 Date: Tue, 14 Jun 2016 23:05:52 +0900 Message-ID: <86vb1bsw5b.wl--xmue@d1.dion.ne.jp> From: Kazuhiro Ito To: Paul Eggert Subject: Re: 25.1.50; encode-time returns wrong result In-Reply-To: <1f1d719e-dbc7-b3d9-d0f7-259a356cea3d@cs.ucla.edu> References: <574E9AA6.1070606@cs.ucla.edu> <86zir4e4nw.wl--xmue@d1.dion.ne.jp> <574FD45F.7060806@cs.ucla.edu> <86twgyheib.wl--xmue@d1.dion.ne.jp> <1f1d719e-dbc7-b3d9-d0f7-259a356cea3d@cs.ucla.edu> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/25.1.50 (x86_64-w64-mingw32) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-MXM-DELIVERY-TYPE: 3 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23600 Cc: Eli Zaretskii , 23600@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > > I noticed that calling format-time-string (or encode-time) with > > time-zone string fixes the problem. But I can't see why. > > I think I see the problem, at least on GNU/Linux: localtime_r needs > someone else to call tzset. I installed the attached patch into the > master branch, to do that. I confirmed the patch resolves the problem. Thank you for the fix. -- Kazuhiro Ito From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 14 10:40:22 2016 Received: (at 23600-done) by debbugs.gnu.org; 14 Jun 2016 14:40:22 +0000 Received: from localhost ([127.0.0.1]:40746 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCpVt-0000IT-Up for submit@debbugs.gnu.org; Tue, 14 Jun 2016 10:40:22 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bCpVs-0000IH-MX for 23600-done@debbugs.gnu.org; Tue, 14 Jun 2016 10:40:21 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id CED1D16145F; Tue, 14 Jun 2016 07:40:14 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id uDcYj0KDXXUY; Tue, 14 Jun 2016 07:40:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3687D161497; Tue, 14 Jun 2016 07:40:14 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XkFTesOMZh0C; Tue, 14 Jun 2016 07:40:14 -0700 (PDT) Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 193AE161449; Tue, 14 Jun 2016 07:40:14 -0700 (PDT) Subject: Re: 25.1.50; encode-time returns wrong result To: Kazuhiro Ito References: <574E9AA6.1070606@cs.ucla.edu> <86zir4e4nw.wl--xmue@d1.dion.ne.jp> <574FD45F.7060806@cs.ucla.edu> <86twgyheib.wl--xmue@d1.dion.ne.jp> <1f1d719e-dbc7-b3d9-d0f7-259a356cea3d@cs.ucla.edu> <86vb1bsw5b.wl--xmue@d1.dion.ne.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <5760174A.8090800@cs.ucla.edu> Date: Tue, 14 Jun 2016 07:40:10 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <86vb1bsw5b.wl--xmue@d1.dion.ne.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: 23600-done Cc: 23600-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) Thanks for checking; closing the bug. From unknown Fri Aug 15 03:56:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 13 Jul 2016 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator