diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-25 06:48:39 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-04-25 06:48:39 +0000 |
commit | c8f938d0b5c322d8d82d431cf6bead9e51a33289 (patch) | |
tree | d45dec80bea221653fd2d579e0af1107da75aea7 /time.c | |
parent | 4c2e9430917f86266f42cee05b34bd176a501276 (diff) | |
download | ruby-c8f938d0b5c322d8d82d431cf6bead9e51a33289.tar.gz |
* time.c (time_get_tm): take time_object instead of gmt.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -48,7 +48,6 @@ typedef unsigned LONG_LONG unsigned_time_t; VALUE rb_cTime; static VALUE time_utc_offset _((VALUE)); -static VALUE time_get_tm(VALUE, int); static VALUE time_gmtime(VALUE); static VALUE time_localtime(VALUE); @@ -1003,10 +1002,11 @@ struct time_object { #define TIME_LOCALTIME_P(tobj) ((tobj)->gmt == 0) #define TIME_SET_LOCALTIME(tobj) ((tobj)->gmt = 0) +static VALUE time_get_tm(VALUE, struct time_object *); #define MAKE_TM(time, tobj) \ do { \ if ((tobj)->tm_got == 0) { \ - time_get_tm((time), (tobj)->gmt); \ + time_get_tm((time), (tobj)); \ } \ } while (0) @@ -2307,9 +2307,9 @@ time_getgmtime(VALUE time) } static VALUE -time_get_tm(VALUE time, int gmt) +time_get_tm(VALUE time, struct time_object *tobj) { - if (gmt) return time_gmtime(time); + if (TIME_UTC_P(tobj)) return time_gmtime(time); return time_localtime(time); } |