all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jason Rumney <jasonr@gnu.org>
Cc: offby1@blarg.net, emacs-pretest-bug@gnu.org, apple@kanis.eu
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	[thread overview]
Message-ID: <ulk9x6f7s.fsf@gnu.org> (raw)
In-Reply-To: <47169ECD.8090401@gnu.org> (message from Jason Rumney on Thu, 18 Oct 2007 00:46:21 +0100)

> Date: Thu, 18 Oct 2007 00:46:21 +0100
> From: Jason Rumney <jasonr@gnu.org>
> Cc: Eric Hanchrow <offby1@blarg.net>, emacs-pretest-bug@gnu.org,
> 	Ivan Kanis <apple@kanis.eu>
> 
> 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 <time.h>
#include <stdlib.h>
#include <stdio.h>

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;
}

  parent reply	other threads:[~2007-10-20 14:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-17 16:55 23.0.50; on Windows, M-x display-time-world shows the same, incorrect, time for all cities Eric Hanchrow
2007-10-17 19:34 ` Eli Zaretskii
2007-10-17 23:08   ` Phil Sung
2007-10-19  5:40     ` Richard Stallman
2007-10-17 23:46   ` Jason Rumney
2007-10-18  4:10     ` Eli Zaretskii
2007-10-19  2:03       ` Stephen J. Turnbull
2007-10-20 14:19     ` Eli Zaretskii [this message]
2007-10-20 20:54       ` Jason Rumney
2007-10-20 21:21         ` Eli Zaretskii
2007-10-27 12:45           ` Eli Zaretskii
2007-10-27 13:49             ` Eric Hanchrow
2007-10-27 15:00               ` Eli Zaretskii
2007-10-27 14:09             ` Jason Rumney
2007-10-27 14:59               ` Eli Zaretskii
2007-10-30 22:01                 ` Jason Rumney
2007-10-17 22:07 ` Jason Rumney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ulk9x6f7s.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=apple@kanis.eu \
    --cc=emacs-pretest-bug@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=offby1@blarg.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.