From 083d726b86ca35553cc3e8439b9cd3d9cd645586 Mon Sep 17 00:00:00 2001 From: yugui Date: Sun, 22 Feb 2009 09:47:35 +0000 Subject: merges r22053 from trunk into ruby_1_9_1. * time.c (LOCALTIME): should call tzset() before localtime_r(). [ruby-dev:37896] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@22512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'time.c') diff --git a/time.c b/time.c index 88425cb2b7..fe70b2d12f 100644 --- a/time.c +++ b/time.c @@ -487,7 +487,7 @@ static VALUE time_get_tm(VALUE, int); #define IF_HAVE_GMTIME_R(x) x #define ASCTIME(tm, buf) asctime_r(tm, buf) #define GMTIME(tm, result) gmtime_r(tm, &result) -#define LOCALTIME(tm, result) localtime_r(tm, &result) +#define LOCALTIME(tm, result) (tzset(),localtime_r(tm, &result)) #else #define IF_HAVE_GMTIME_R(x) /* nothing */ #define ASCTIME(tm, buf) asctime(tm) -- cgit v1.2.3