ruby-changes:8214
From: nobu <ko1@a...>
Date: Fri, 10 Oct 2008 11:34:12 +0900 (JST)
Subject: [ruby-changes:8214] Ruby:r19742 (ruby_1_8): * time.c (time_mdump, time_mload): preserves GMT status.
nobu 2008-10-10 11:34:02 +0900 (Fri, 10 Oct 2008) New Revision: 19742 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19742 Log: * time.c (time_mdump, time_mload): preserves GMT status. [ruby-core:19252] Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/time.c Index: ruby_1_8/time.c =================================================================== --- ruby_1_8/time.c (revision 19741) +++ ruby_1_8/time.c (revision 19742) @@ -1931,6 +1931,7 @@ rb_raise(rb_eArgError, "year too big to marshal"); p = 0x1UL << 31 | /* 1 */ + tobj->gmt << 30 | /* 1 */ tm->tm_year << 14 | /* 16 */ tm->tm_mon << 10 | /* 4 */ tm->tm_mday << 5 | /* 5 */ @@ -1989,7 +1990,7 @@ time_t sec, usec; unsigned char *buf; struct tm tm; - int i; + int i, gmt; time_modify(time); StringValue(str); @@ -2011,7 +2012,8 @@ usec = s; } else { - p &= ~(1UL<<31); + p &= ~(1UL<<31); + gmt = (p >> 30) & 0x1; tm.tm_year = (p >> 14) & 0xffff; tm.tm_mon = (p >> 10) & 0xf; tm.tm_mday = (p >> 5) & 0x1f; @@ -2027,6 +2029,7 @@ GetTimeval(time, tobj); tobj->tm_got = 0; + tobj->gmt = gmt; tobj->tv.tv_sec = sec; tobj->tv.tv_usec = usec; return time; Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 19741) +++ ruby_1_8/ChangeLog (revision 19742) @@ -1,3 +1,8 @@ +Fri Oct 10 11:34:00 2008 Nobuyoshi Nakada <nobu@r...> + + * time.c (time_mdump, time_mload): preserves GMT status. + [ruby-core:19252] + Fri Oct 10 00:21:39 2008 Nobuyoshi Nakada <nobu@r...> * lib/optparse.rb (ParseError.filter_backtrace): removes internal -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/