Skip to content

Commit

Permalink
Using TZMODE_SET_LOCALTIME macro
Browse files Browse the repository at this point in the history
  • Loading branch information
S-H-GAMELINKS authored and nobu committed May 26, 2022
1 parent 2f5edfa commit 46cf3bf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions time.c
Expand Up @@ -1919,7 +1919,7 @@ time_init_now(rb_execution_context_t *ec, VALUE time, VALUE zone)

time_modify(time);
GetNewTimeval(time, tobj);
tobj->tzmode = TIME_TZMODE_LOCALTIME;
TZMODE_SET_LOCALTIME(tobj);
tobj->tm_got=0;
tobj->timew = WINT2FIXWV(0);
rb_timespec_now(&ts);
Expand Down Expand Up @@ -2181,7 +2181,7 @@ zone_set_offset(VALUE zone, struct time_object *tobj,
validate_utc_offset(off);
tobj->vtm.utc_offset = off;
tobj->vtm.zone = zone;
tobj->tzmode = TIME_TZMODE_LOCALTIME;
TZMODE_SET_LOCALTIME(tobj);
}

static wideval_t
Expand Down Expand Up @@ -2399,7 +2399,7 @@ time_init_args(rb_execution_context_t *ec, VALUE time, VALUE year, VALUE mon, VA
return time;
}

tobj->tzmode = TIME_TZMODE_LOCALTIME;
TZMODE_SET_LOCALTIME(tobj);
tobj->tm_got=0;
tobj->timew = WINT2FIXWV(0);

Expand Down Expand Up @@ -2464,7 +2464,7 @@ time_new_timew(VALUE klass, wideval_t timew)
struct time_object *tobj;

tobj = DATA_PTR(time); /* skip type check */
tobj->tzmode = TIME_TZMODE_LOCALTIME;
TZMODE_SET_LOCALTIME(tobj);
tobj->timew = timew;

return time;
Expand Down Expand Up @@ -5301,7 +5301,7 @@ end_submicro: ;
}

GetNewTimeval(time, tobj);
tobj->tzmode = TIME_TZMODE_LOCALTIME;
TZMODE_SET_LOCALTIME(tobj);
tobj->tm_got = 0;
tobj->timew = timew;
if (gmt) {
Expand Down Expand Up @@ -5414,7 +5414,7 @@ tm_initialize(int argc, VALUE *argv, VALUE tm)
{
#if TM_IS_TIME
struct time_object *tobj = DATA_PTR(tm);
tobj->tzmode = TIME_TZMODE_UTC;
TZMODE_SET_UTC(tobj);
tobj->timew = t;
tobj->vtm = vtm;
#else
Expand Down

0 comments on commit 46cf3bf

Please sign in to comment.