diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-04 19:09:58 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-04 19:09:58 +0000 |
commit | b5ae8db530b3f091f5803bc0db3e8b5cbe237d2d (patch) | |
tree | 1f1ff184726199c025dbbf0322fb6363fe44f5f7 /time.c | |
parent | efdc317e5967dbba486dbe36f7e9f84f5fdb525a (diff) | |
download | ruby-b5ae8db530b3f091f5803bc0db3e8b5cbe237d2d.tar.gz |
* time.c (LOCALTIME): should call tzset() before localtime_r().
[ruby-dev:37896]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |