From 42c4c67a4acbee970f3805f685c32c8a993484d3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 7 Jun 2007 21:38:10 +0000 Subject: [PATCH] (Fcurrent_time_zone): Remove hack for Japanese Windows. --- src/ChangeLog | 6 ++++++ src/editfns.c | 15 ++------------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ae796a64db7..9b88e6a2fa3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2007-06-07 Jason Rumney + + * s/ms-w32.h: Don't define HAVE_TZNAME. + + * editfns.c (Fcurrent_time_zone): Remove hack for Japanese Windows. + 2007-06-07 YAMAMOTO Mitsuharu * mac.c (xrm_get_preference_database): Remove BLOCK_INPUT. diff --git a/src/editfns.c b/src/editfns.c index 37498e3b6f7..2f759a38dd0 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -1974,6 +1974,7 @@ the data it can't find. */) int offset = tm_diff (t, &gmt); char *s = 0; char buf[6]; + #ifdef HAVE_TM_ZONE if (t->tm_zone) s = (char *)t->tm_zone; @@ -1984,19 +1985,6 @@ the data it can't find. */) #endif #endif /* not HAVE_TM_ZONE */ -#if defined HAVE_TM_ZONE || defined HAVE_TZNAME - if (s) - { - /* On Japanese w32, we can get a Japanese string as time - zone name. Don't accept that. */ - char *p; - for (p = s; *p && (isalnum ((unsigned char)*p) || *p == ' '); ++p) - ; - if (p == s || *p) - s = NULL; - } -#endif - if (!s) { /* No local time zone name is available; use "+-NNNN" instead. */ @@ -2004,6 +1992,7 @@ the data it can't find. */) sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60); s = buf; } + return Fcons (make_number (offset), Fcons (build_string (s), Qnil)); } else -- 2.39.2