diff --git a/ChangeLog b/ChangeLog index 3d6fdf3149..b379c32bbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Feb 5 03:55:22 2009 Yukihiro Matsumoto + + * time.c (LOCALTIME): should call tzset() before localtime_r(). + [ruby-dev:37896] + Thu Feb 5 02:12:35 2009 Alexander Zavorine * symbian/configure.bat: Updated Symbain configuration procedure to 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)