From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: 23.0.50; on Windows, M-x display-time-world shows the same, incorrect, time for all cities Date: Sat, 20 Oct 2007 16:19:35 +0200 Message-ID: References: <878x6165pn.fsf@offby1.atm01.sea.blarg.net> <47169ECD.8090401@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1192890062 6582 80.91.229.12 (20 Oct 2007 14:21:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Oct 2007 14:21:02 +0000 (UTC) Cc: offby1@blarg.net, emacs-pretest-bug@gnu.org, apple@kanis.eu To: Jason Rumney Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 20 16:21:02 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IjFC7-00009c-8D for ged-emacs-devel@m.gmane.org; Sat, 20 Oct 2007 16:20:51 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjFBz-0000Li-Mc for ged-emacs-devel@m.gmane.org; Sat, 20 Oct 2007 10:20:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IjFBK-0008Qh-Fj for emacs-devel@gnu.org; Sat, 20 Oct 2007 10:20:02 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IjFBI-0008P3-99 for emacs-devel@gnu.org; Sat, 20 Oct 2007 10:20:02 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IjFBI-0008Ol-30 for emacs-devel@gnu.org; Sat, 20 Oct 2007 10:20:00 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IjFBH-0000SF-NH for emacs-devel@gnu.org; Sat, 20 Oct 2007 10:19:59 -0400 Original-Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IjFBH-00073Y-Fw for emacs-pretest-bug@gnu.org; Sat, 20 Oct 2007 10:19:59 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1IjFBE-0000RH-M8 for emacs-pretest-bug@gnu.org; Sat, 20 Oct 2007 10:19:59 -0400 Original-Received: from nitzan.inter.net.il ([213.8.233.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IjFBA-0000Ol-5m; Sat, 20 Oct 2007 10:19:52 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-206-221.inter.net.il [80.230.206.221]) by nitzan.inter.net.il (MOS 3.7.3a-GA) with ESMTP id IBY24192 (AUTH halo1); Sat, 20 Oct 2007 16:16:58 +0200 (IST) In-reply-to: <47169ECD.8090401@gnu.org> (message from Jason Rumney on Thu, 18 Oct 2007 00:46:21 +0100) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81298 gmane.emacs.pretest.bugs:20177 Archived-At: > Date: Thu, 18 Oct 2007 00:46:21 +0100 > From: Jason Rumney > Cc: Eric Hanchrow , emacs-pretest-bug@gnu.org, > Ivan Kanis > > there appear to be multiple problems beyond just the timezone > name, including the fact that standard libraries on Windows only read > the TZ environment variable on startup I don't see on my system that TZ is only read on startup. The attached simple test program demonstrates that TZ can be changed during the program's run with expected results, at least on my XP SP2 box. So it looks like just by fixing display-time-world-list we could make this work on Windows as well. Am I missing something? ------------------------------ cut here ------------------------- #include #include #include int main (int argc, char *argv[]) { char tstr[1024]; time_t t; t = time (NULL); strftime (tstr, sizeof (tstr), "%c %z", localtime (&t)); printf ("%s\n", tstr); if (_putenv ("TZ=EST5EDT") != -1) { _tzset (); strftime (tstr, sizeof (tstr), "%c %z", localtime (&t)); printf ("%s\n", tstr); } if (_putenv ("TZ=PST8PDT") != -1) { _tzset (); strftime (tstr, sizeof (tstr), "%c %z", localtime (&t)); printf ("%s\n", tstr); } return 0; }