1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2009-02-04 19:09:58 +00:00
parent efdc317e59
commit b5ae8db530
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Thu Feb 5 03:55:22 2009 Yukihiro Matsumoto <matz@ruby-lang.org>
* time.c (LOCALTIME): should call tzset() before localtime_r().
[ruby-dev:37896]
Thu Feb 5 02:12:35 2009 Alexander Zavorine <alexandre.zavorine@nokia.com> Thu Feb 5 02:12:35 2009 Alexander Zavorine <alexandre.zavorine@nokia.com>
* symbian/configure.bat: Updated Symbain configuration procedure to * symbian/configure.bat: Updated Symbain configuration procedure to

2
time.c
View file

@ -487,7 +487,7 @@ static VALUE time_get_tm(VALUE, int);
#define IF_HAVE_GMTIME_R(x) x #define IF_HAVE_GMTIME_R(x) x
#define ASCTIME(tm, buf) asctime_r(tm, buf) #define ASCTIME(tm, buf) asctime_r(tm, buf)
#define GMTIME(tm, result) gmtime_r(tm, &result) #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 #else
#define IF_HAVE_GMTIME_R(x) /* nothing */ #define IF_HAVE_GMTIME_R(x) /* nothing */
#define ASCTIME(tm, buf) asctime(tm) #define ASCTIME(tm, buf) asctime(tm)