summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-19 10:47:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-11-19 10:47:03 +0000
commit6445aab4724529f511c5d2908b452e8145560f14 (patch)
tree091e7776fa9ce043ef660f50cedb39fb62a75477 /time.c
parentb0fe68867625cf252dd100afbc4a7776354035d7 (diff)
* time.c (TIME_COPY_GMT): copy vtm.utc_offset and vtm.zone too.
patch by Tomoyuki Chikanaga. [ruby-dev:44827] [Bug #5586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/time.c b/time.c
index 3e50c7c..96b717b 100644
--- a/time.c
+++ b/time.c
@@ -1820,7 +1820,10 @@ struct time_object {
(tobj)->vtm.utc_offset = (off), \
(tobj)->vtm.zone = NULL)
-#define TIME_COPY_GMT(tobj1, tobj2) ((tobj1)->gmt = (tobj2)->gmt)
+#define TIME_COPY_GMT(tobj1, tobj2) \
+ ((tobj1)->gmt = (tobj2)->gmt, \
+ (tobj1)->vtm.utc_offset = (tobj2)->vtm.utc_offset, \
+ (tobj1)->vtm.zone = (tobj2)->vtm.zone)
static VALUE time_get_tm(VALUE, struct time_object *);
#define MAKE_TM(time, tobj) \