aboutsummaryrefslogtreecommitdiffstats
path: root/src/editfns.c
diff options
context:
space:
mode:
authorJason Rumney2007-06-07 21:38:10 +0000
committerJason Rumney2007-06-07 21:38:10 +0000
commit42c4c67a4acbee970f3805f685c32c8a993484d3 (patch)
tree124a20fdadd7c47bef84f6c0a5562a3153de34a8 /src/editfns.c
parent4608d8296199d2adcc7bece60ce88e203d80759a (diff)
downloademacs-42c4c67a4acbee970f3805f685c32c8a993484d3.tar.gz
emacs-42c4c67a4acbee970f3805f685c32c8a993484d3.zip
(Fcurrent_time_zone): Remove hack for Japanese Windows.
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c15
1 files changed, 2 insertions, 13 deletions
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. */)
1974 int offset = tm_diff (t, &gmt); 1974 int offset = tm_diff (t, &gmt);
1975 char *s = 0; 1975 char *s = 0;
1976 char buf[6]; 1976 char buf[6];
1977
1977#ifdef HAVE_TM_ZONE 1978#ifdef HAVE_TM_ZONE
1978 if (t->tm_zone) 1979 if (t->tm_zone)
1979 s = (char *)t->tm_zone; 1980 s = (char *)t->tm_zone;
@@ -1984,19 +1985,6 @@ the data it can't find. */)
1984#endif 1985#endif
1985#endif /* not HAVE_TM_ZONE */ 1986#endif /* not HAVE_TM_ZONE */
1986 1987
1987#if defined HAVE_TM_ZONE || defined HAVE_TZNAME
1988 if (s)
1989 {
1990 /* On Japanese w32, we can get a Japanese string as time
1991 zone name. Don't accept that. */
1992 char *p;
1993 for (p = s; *p && (isalnum ((unsigned char)*p) || *p == ' '); ++p)
1994 ;
1995 if (p == s || *p)
1996 s = NULL;
1997 }
1998#endif
1999
2000 if (!s) 1988 if (!s)
2001 { 1989 {
2002 /* No local time zone name is available; use "+-NNNN" instead. */ 1990 /* No local time zone name is available; use "+-NNNN" instead. */
@@ -2004,6 +1992,7 @@ the data it can't find. */)
2004 sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60); 1992 sprintf (buf, "%c%02d%02d", (offset < 0 ? '-' : '+'), am/60, am%60);
2005 s = buf; 1993 s = buf;
2006 } 1994 }
1995
2007 return Fcons (make_number (offset), Fcons (build_string (s), Qnil)); 1996 return Fcons (make_number (offset), Fcons (build_string (s), Qnil));
2008 } 1997 }
2009 else 1998 else