isdst()
public
Show source
/*
* call-seq:
* time.isdst => true or false
* time.dst? => true or false
*
* Returns <code>true</code> if <i>time</i> occurs during Daylight
* Saving Time in its time zone.
*
* Time.local(2000, 7, 1).isdst #=> true
* Time.local(2000, 1, 1).isdst #=> false
* Time.local(2000, 7, 1).dst? #=> true
* Time.local(2000, 1, 1).dst? #=> false
*/
static VALUE
time_isdst(time)
VALUE time;
{
struct time_object *tobj;
GetTimeval(time, tobj);
if (tobj->tm_got == 0) {
time_get_tm(time, tobj->gmt);
}
return tobj->tm.tm_isdst?Qtrue:Qfalse;
}