method
isdst
isdst()
public
Returns true if time occurs during Daylight Saving Time in its time zone.
# CST6CDT:
Time.local(2000, 1, 1).zone #=> "CST" Time.local(2000, 1, 1).isdst #=> false Time.local(2000, 1, 1).dst? #=> false Time.local(2000, 7, 1).zone #=> "CDT" Time.local(2000, 7, 1).isdst #=> true Time.local(2000, 7, 1).dst? #=> true
# Asia/Tokyo:
Time.local(2000, 1, 1).zone #=> "JST" Time.local(2000, 1, 1).isdst #=> false Time.local(2000, 1, 1).dst? #=> false Time.local(2000, 7, 1).zone #=> "JST" Time.local(2000, 7, 1).isdst #=> false Time.local(2000, 7, 1).dst? #=> false