From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 05 17:44:15 2010 Received: (at submit) by debbugs.gnu.org; 5 Nov 2010 21:44:15 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PEU51-0001EF-Fo for submit@debbugs.gnu.org; Fri, 05 Nov 2010 17:44:15 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PEU4z-0001EA-QK for submit@debbugs.gnu.org; Fri, 05 Nov 2010 17:44:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PEU9M-0001PD-2d for submit@debbugs.gnu.org; Fri, 05 Nov 2010 17:48:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:52424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PEU9M-0001P7-0a for submit@debbugs.gnu.org; Fri, 05 Nov 2010 17:48:44 -0400 Received: from [140.186.70.92] (port=50033 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PEU9K-0000qe-Tg for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2010 17:48:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PEU9J-0001Ot-Mi for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2010 17:48:42 -0400 Received: from mailout2-5.pacific.net.au ([61.8.2.228]:49288 helo=mailout2.pacific.net.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PEU9J-0001Oe-4f for bug-gnu-emacs@gnu.org; Fri, 05 Nov 2010 17:48:41 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id ED77F2A6368 for ; Sat, 6 Nov 2010 08:48:36 +1100 (EST) Received: from blah.blah (unknown [203.26.175.99]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 8A56327409 for ; Sat, 6 Nov 2010 08:48:30 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1PEU7O-0001VV-5d for bug-gnu-emacs@gnu.org; Sat, 06 Nov 2010 08:46:42 +1100 From: Kevin Ryde To: bug-gnu-emacs@gnu.org Subject: 23.2; (require 'time) changes timezone Date: Sat, 06 Nov 2010 08:46:42 +1100 Message-ID: <87fwvftpdp.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Doing a (require 'time) changes the `current-time-zone' to the system default per a (set-time-zone-rule nil). I think that loading a .el shouldn't change the zone. The effect can be seen from "emacs -Q" (let (before after) (set-time-zone-rule "ABC+1") (setq before (current-time-zone)) (require 'time) (setq after (current-time-zone)) (list (car before) (car after))) => (-3600 39600) where I expected => (-3600 -3600) which is what happens if evaluated a second time, since (require 'time) is then a no-op. I suppose it comes from display-time-world-list probing whether the Olson timezone names are known to the C library. I think it should save and restore the existing TZ the way `add-change-log-entry' and `time-stamp-string' do. For some of my own code lately I tried a macro to hide the details and the unwind-protect a bit. Perhaps a name like with-time-zone-rule or with-temporary-time-zone-rule would match set-time-zone-rule better than "...-TZ". (defmacro xtide-with-TZ (tz &rest body) "Run BODY with `set-time-zone-rule' temporarily to TZ. The current timezone (per `getenv' \"TZ\") is restored by an `unwind-protect'." (declare (indent 1)) `(let ((xtide-with-TZ--old (getenv "TZ"))) (set-time-zone-rule ,tz) (unwind-protect (progn ,@body) (set-time-zone-rule xtide-with-TZ--old)))) In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.0) of 2010-05-16 on raven, modified by Debian configured using `configure '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU value of $XMODIFIERS: nil locale-coding-system: iso-latin-1-unix default enable-multibyte-characters: t From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 08 12:57:22 2010 Received: (at 7337) by debbugs.gnu.org; 8 Nov 2010 17:57:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFVy6-00071Q-9y for submit@debbugs.gnu.org; Mon, 08 Nov 2010 12:57:22 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFVy4-00071L-0S for 7337@debbugs.gnu.org; Mon, 08 Nov 2010 12:57:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtEKAF7K10xMCpqE/2dsb2JhbAChCIECcr1UhUgEhFiNWg X-IronPort-AV: E=Sophos;i="4.58,314,1286164800"; d="scan'208";a="81942188" Received: from 76-10-154-132.dsl.teksavvy.com (HELO pastel.home) ([76.10.154.132]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 08 Nov 2010 13:01:40 -0500 Received: by pastel.home (Postfix, from userid 20848) id 656E1A86D8; Mon, 8 Nov 2010 13:01:40 -0500 (EST) From: Stefan Monnier To: Kevin Ryde Subject: Re: bug#7337: 23.2; (require 'time) changes timezone Message-ID: References: <87fwvftpdp.fsf@blah.blah> Date: Mon, 08 Nov 2010 13:01:40 -0500 In-Reply-To: <87fwvftpdp.fsf@blah.blah> (Kevin Ryde's message of "Sat, 06 Nov 2010 08:46:42 +1100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 7337 Cc: 7337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) > Doing a (require 'time) changes the `current-time-zone' to the system > default per a (set-time-zone-rule nil). I think that loading a .el > shouldn't change the zone. The effect can be seen from "emacs -Q" > (let (before after) > (set-time-zone-rule "ABC+1") > (setq before (current-time-zone)) > (require 'time) > (setq after (current-time-zone)) > (list (car before) (car after))) > => (-3600 39600) > where I expected > => (-3600 -3600) > which is what happens if evaluated a second time, since (require 'time) > is then a no-op. Indeed, that's a bug. > I suppose it comes from display-time-world-list probing whether the > Olson timezone names are known to the C library. I think it should save > and restore the existing TZ the way `add-change-log-entry' and > `time-stamp-string' do. But do those two other uses work? > For some of my own code lately I tried a macro to hide the details and > the unwind-protect a bit. Perhaps a name like with-time-zone-rule or > with-temporary-time-zone-rule would match set-time-zone-rule better than > "...-TZ". > (defmacro xtide-with-TZ (tz &rest body) > "Run BODY with `set-time-zone-rule' temporarily to TZ. > The current timezone (per `getenv' \"TZ\") is restored by an > `unwind-protect'." > (declare (indent 1)) > `(let ((xtide-with-TZ--old (getenv "TZ"))) > (set-time-zone-rule ,tz) > (unwind-protect > (progn ,@body) > (set-time-zone-rule xtide-with-TZ--old)))) And similar does this code work for you? In my tests, (getenv "TZ") just always returns nil. So it seems we'd need to add a new function time-zone-rule to get the current time-zone rule. Or else we could make set-time-zone-rule return the previous time-zone rule. Stefan From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 08 19:32:53 2010 Received: (at 7337) by debbugs.gnu.org; 9 Nov 2010 00:32:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFc8r-0003XL-2t for submit@debbugs.gnu.org; Mon, 08 Nov 2010 19:32:53 -0500 Received: from mailout1-5.pacific.net.au ([61.8.2.212] helo=mailout1.pacific.net.au) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PFc8o-0003XE-Eh for 7337@debbugs.gnu.org; Mon, 08 Nov 2010 19:32:51 -0500 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id DF3995DF856; Tue, 9 Nov 2010 11:37:27 +1100 (EST) Received: from blah.blah (unknown [203.26.175.213]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id B6F762741D; Tue, 9 Nov 2010 11:37:04 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1PFcC2-0004ZF-1D; Tue, 09 Nov 2010 11:36:10 +1100 From: Kevin Ryde To: Stefan Monnier Subject: Re: bug#7337: 23.2; (require 'time) changes timezone References: <87fwvftpdp.fsf@blah.blah> Date: Tue, 09 Nov 2010 11:36:10 +1100 In-Reply-To: (Stefan Monnier's message of "Mon, 08 Nov 2010 13:01:40 -0500") Message-ID: <87mxpjpc3p.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 7337 Cc: 7337@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.3 (----) Stefan Monnier writes: > > But do those two other uses work? Oh, they might be dodgy too. I suppose set-time-zone-rule changes the C level environ[], but the lisp `getenv' looks in the process-environment variable, not environ[]. Does that sound right? Should set-time-zone-rule set TZ in process-environment? From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 17 19:11:48 2010 Received: (at 7337) by debbugs.gnu.org; 18 Nov 2010 00:11:49 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIs6O-0006Gr-1w for submit@debbugs.gnu.org; Wed, 17 Nov 2010 19:11:48 -0500 Received: from mailout1-5.pacific.net.au ([61.8.2.212] helo=mailout1.pacific.net.au) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PIs6K-0006Gl-T1 for 7337@debbugs.gnu.org; Wed, 17 Nov 2010 19:11:46 -0500 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout1.pacific.net.au (Postfix) with ESMTP id 2CB5A5E0B44 for <7337@debbugs.gnu.org>; Thu, 18 Nov 2010 11:16:46 +1100 (EST) Received: from blah.blah (unknown [203.26.175.52]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 819042741A for <7337@debbugs.gnu.org>; Thu, 18 Nov 2010 11:16:45 +1100 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1PIsB7-00049x-Gn for 7337@debbugs.gnu.org; Thu, 18 Nov 2010 11:16:41 +1100 From: Kevin Ryde To: 7337@debbugs.gnu.org Subject: Re: bug#7337: 23.2; (require 'time) changes timezone References: <87fwvftpdp.fsf@blah.blah> <87mxpjpc3p.fsf@blah.blah> Date: Thu, 18 Nov 2010 11:16:41 +1100 In-Reply-To: <87mxpjpc3p.fsf@blah.blah> (Kevin Ryde's message of "Tue, 09 Nov 2010 11:36:10 +1100") Message-ID: <871v6jo592.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: 7337 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) I wrote: > > lisp `getenv' ... TZ Perhaps it should effectively be a save-and-restore of getenv TZ, since setenv TZ does the set-time-zone-rule (in emacs22 up). (let ((old (getenv "TZ"))) (setenv "TZ" new) (unwind-protect (...) (setenv "TZ" old))) Which would still lose any set-time-zone-rule that had not been accompanied by a (setenv "TZ"). But if you've got TZ in the C environ[] and lisp process-environment out of sync then there's probably going to be trouble no matter what. From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 10:45:21 2011 Received: (at 7337) by debbugs.gnu.org; 14 Jul 2011 14:45:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhNAG-00075V-Ln for submit@debbugs.gnu.org; Thu, 14 Jul 2011 10:45:20 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhNA2-0006sL-MC for 7337@debbugs.gnu.org; Thu, 14 Jul 2011 10:45:07 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QhN9l-00086Y-O2; Thu, 14 Jul 2011 16:44:49 +0200 From: Lars Magne Ingebrigtsen To: Stefan Monnier Subject: Re: bug#7337: 23.2; (require 'time) changes timezone In-Reply-To: (Stefan Monnier's message of "Mon, 08 Nov 2010 13:01:40 -0500") Date: Thu, 14 Jul 2011 16:43:53 +0200 Message-ID: References: <87fwvftpdp.fsf@blah.blah> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Depeche Mode's _A Question of Lust_: "A Question of Lust (minimal)" X-Hashcash: 1:23:110714:monnier@iro.umontreal.ca::3RwLLin0CAuO2SRd:00000000000000000000000000000000000007iTj X-Hashcash: 1:23:110714:user42@zip.com.au::8IH83NNiOEAdICT6:000000000000000000000000000000000000000000010N9t X-Hashcash: 1:23:110714:7337@debbugs.gnu.org::MMag7YcCTsWVCvYi:00000000000000000000000000000000000000001b0q3 MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QhN9l-00086Y-O2 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311259490.04009@2vFJTeyGOT25jWN6rwqxMQ X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7337 Cc: 7337@debbugs.gnu.org, Kevin Ryde X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Stefan Monnier writes: > And similar does this code work for you? In my tests, (getenv "TZ") > just always returns nil. So it seems we'd need to add a new function > time-zone-rule to get the current time-zone rule. Or else we could > make set-time-zone-rule return the previous time-zone rule. Hm. Would that be returning the tzname variable (as described in the tzet manual page)? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 14 20:43:08 2011 Received: (at 7337) by debbugs.gnu.org; 15 Jul 2011 00:43:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhWUm-0007bX-74 for submit@debbugs.gnu.org; Thu, 14 Jul 2011 20:43:08 -0400 Received: from mailout2-6.pacific.net.au ([61.8.2.229] helo=mailout2.pacific.net.au) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QhWUi-0007az-9N for 7337@debbugs.gnu.org; Thu, 14 Jul 2011 20:43:06 -0400 Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id A5DFE2BBA36; Fri, 15 Jul 2011 10:42:56 +1000 (EST) Received: from blah.blah (unknown [203.26.175.98]) by mailproxy2.pacific.net.au (Postfix) with ESMTP id 96DBB27424; Fri, 15 Jul 2011 10:42:49 +1000 (EST) Received: from gg by blah.blah with local (Exim 4.72) (envelope-from ) id 1QhWSY-00064y-Kd; Fri, 15 Jul 2011 10:40:50 +1000 From: Kevin Ryde To: Lars Magne Ingebrigtsen Subject: Re: bug#7337: 23.2; (require 'time) changes timezone References: <87fwvftpdp.fsf@blah.blah> Date: Fri, 15 Jul 2011 10:40:50 +1000 In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 14 Jul 2011 16:43:53 +0200") Message-ID: <87k4bkjrzh.fsf@blah.blah> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 7337 Cc: 7337@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) Lars Magne Ingebrigtsen writes: > > Hm. Would that be returning the tzname variable (as described in the > tzet manual page)? Probably not, perhaps the TZ entry the C-level environ[], if that's essentially what set-time-zone-rule writes to. I later changed the macro I posted to the bit below, doing a `setenv' on restoring as well as `set-time-zone-rule'. I suspect set-time-zone-rule might update the lisp process-environment as well as the C environ[] ... but I'm not certain if that's right, or enough, for combinations of save/restore and to influence the current process and/or spawned subprocesses, etc etc. (defmacro xtide-with-TZ (tz &rest body) ;; checkdoc-params: (tz body) "Run BODY with `set-time-zone-rule' temporarily to TZ. The current timezone (per `getenv' \"TZ\") is restored by an `unwind-protect'. This doesn't work properly if a `set-time-zone-rule' has been applied but (setenv \"TZ\") not updated accordingly. A `setenv' is done here so that `xtide-with-TZ' will nest successfully at least." ;; This getenv and restore is similar to what add-log.el ;; `add-change-log-entry' and time-stamp.el `time-stamp-string' do. In ;; Emacs 23.2 the initializer in `display-time-world-list' always sets ;; back to nil, but a restore seems a much better idea. ;; ;; (setenv "TZ") makes the new TZ visible to a nested `xtide-with-TZ' or ;; to `add-change-log-entry'. As of Emacs 23.2 `set-time-zone-rule' ;; changes TZ in the C-level environ[], but not in the lisp level ;; `process-environment'. ;; ;; setenv in emacs22 up returns the value set, but in emacs21 and xemacs21 ;; it's the whole new `process-environment', or some such, so don't depend ;; on the value. ;; ;; setenv in emacs22 up also calls `set-time-zone-rule' itself, but for ;; emacs21 and xemacs21 must do so explicitly ;; (declare (indent 1)) ;; from 'cl `(let ((xtide-with-TZ--old (getenv "TZ")) (xtide-with-TZ--new ,tz)) ;; evaluate `tz' expression only once (setenv "TZ" xtide-with-TZ--new) (set-time-zone-rule xtide-with-TZ--new) (unwind-protect (progn ,@body) (setenv "TZ" xtide-with-TZ--old) (set-time-zone-rule xtide-with-TZ--old)))) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 02 16:09:32 2011 Received: (at control) by debbugs.gnu.org; 2 Aug 2011 20:09:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoLHP-0002n3-11 for submit@debbugs.gnu.org; Tue, 02 Aug 2011 16:09:32 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QoLHM-0002mv-8o for control@debbugs.gnu.org; Tue, 02 Aug 2011 16:09:29 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QoLGm-0000Cq-GT for control@debbugs.gnu.org; Tue, 02 Aug 2011 22:08:52 +0200 Date: Tue, 02 Aug 2011 22:08:29 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #7337 X-MailScanner-ID: 1QoLGm-0000Cq-GT X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1312920532.65008@hQDpY5yuvcmsWgpayU+rRw X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) severity 7337 normal From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 08 11:56:43 2011 Received: (at 7337) by debbugs.gnu.org; 8 Aug 2011 15:56:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqSC2-0006lY-SC for submit@debbugs.gnu.org; Mon, 08 Aug 2011 11:56:43 -0400 Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqSC0-0006lQ-7v for 7337@debbugs.gnu.org; Mon, 08 Aug 2011 11:56:40 -0400 Received: from furball (dhcp-128-36-14-148.central.yale.edu [128.36.14.148]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p78FtZMF008819 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 8 Aug 2011 11:55:36 -0400 From: Chong Yidong To: Kevin Ryde Subject: Re: bug#7337: 23.2; (require 'time) changes timezone References: <87fwvftpdp.fsf@blah.blah> <87mxpjpc3p.fsf@blah.blah> Date: Mon, 08 Aug 2011 11:55:35 -0400 In-Reply-To: <87mxpjpc3p.fsf@blah.blah> (Kevin Ryde's message of "Tue, 09 Nov 2010 11:36:10 +1100") Message-ID: <871uwvj3t4.fsf@stupidchicken.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 7337 Cc: 7337@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) Kevin Ryde writes: > Oh, they might be dodgy too. I suppose set-time-zone-rule changes the C > level environ[], but the lisp `getenv' looks in the process-environment > variable, not environ[]. Does that sound right? Should > set-time-zone-rule set TZ in process-environment? Yes, Lisp code should typically use (setenv "TZ" ...) rather than set-time-zone-rule for this reason. I have updated the doc of set-time-zone-rule, and changed the users of set-time-zone-rule accordingly. From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 08 11:56:55 2011 Received: (at control) by debbugs.gnu.org; 8 Aug 2011 15:56:55 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqSCE-0006lw-EG for submit@debbugs.gnu.org; Mon, 08 Aug 2011 11:56:54 -0400 Received: from vm-emlprdomr-05.its.yale.edu ([130.132.50.146]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QqSCC-0006lq-KR for control@debbugs.gnu.org; Mon, 08 Aug 2011 11:56:53 -0400 Received: from furball (dhcp-128-36-14-148.central.yale.edu [128.36.14.148]) (authenticated bits=0) by vm-emlprdomr-05.its.yale.edu (8.14.4/8.14.4) with ESMTP id p78Ftnfk009012 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Mon, 8 Aug 2011 11:55:49 -0400 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 7337 Date: Mon, 08 Aug 2011 11:55:49 -0400 Message-ID: <87y5z3aoe2.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.71 on 130.132.50.146 X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) close 7337 thanks From unknown Thu Aug 14 22:19: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: Tue, 06 Sep 2011 11:24:04 +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