summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 09:47:35 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-22 09:47:35 +0000
commit12d893c72c1fa220bed44b59f68c80f58fbbca69 (patch)
treed9728f1349f441e66fc3bed4660e20fb0bb04461
parent01dffdc75fe6cdb218e450224e3e99f2679a80bc (diff)
downloadruby-12d893c72c1fa220bed44b59f68c80f58fbbca69.tar.gz
ruby-12d893c72c1fa220bed44b59f68c80f58fbbca69.tar.xz
ruby-12d893c72c1fa220bed44b59f68c80f58fbbca69.zip
merges r22053 from trunk into ruby_1_9_1.
* time.c (LOCALTIME): should call tzset() before localtime_r(). [ruby-dev:37896] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@22512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--time.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 492fabfad..839c063fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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]
+
Wed Feb 4 11:45:06 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/mkexports.rb: shouldn't export DllMain.
diff --git a/time.c b/time.c
index 88425cb2b..fe70b2d12 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)