Bug #15988 ยป time-zone-dst.patch
time.c | ||
---|---|---|
GetTimeval(time, tobj);
|
||
MAKE_TM(time, tobj);
|
||
if ((RB_BUILTIN_TYPE(tobj->vtm.zone) != RUBY_T_STRING) &&
|
||
rb_respond_to(tobj->vtm.zone, rb_intern("dst?"))) {
|
||
return RTEST(rb_funcall(tobj->vtm.zone, rb_intern("dst?"), 1, time)) ? Qtrue : Qfalse;
|
||
}
|
||
if (tobj->vtm.isdst == VTM_ISDST_INITVAL) {
|
||
rb_raise(rb_eRuntimeError, "isdst is not set yet");
|
||
}
|
||
... | ... | |
* == Timezone argument
|
||
*
|
||
* A timezone argument must have +local_to_utc+ and +utc_to_local+
|
||
* methods, and may have +name+ and +abbr+ methods.
|
||
* methods, and may have +name+, +abbr+, and +dst?+ methods.
|
||
*
|
||
* The +local_to_utc+ method should convert a Time-like object from
|
||
* the timezone to UTC, and +utc_to_local+ is the opposite. The
|
||
... | ... | |
*
|
||
* The +abbr+ method is used by '%Z' in #strftime.
|
||
*
|
||
* The +dst?+ method is called with a +Time+ value and should return whether
|
||
* the +Time+ value is in daylight savings time in the zone.
|
||
*
|
||
* === Auto conversion to Timezone
|
||
*
|
||
* At loading marshaled data, a timezone name will be converted to a timezone
|