1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Document that Timezone argument for Time uses dst? if available [ci skip]

This commit is contained in:
Jeremy Evans 2019-07-29 11:03:32 -07:00
parent 9170646f13
commit 177731aadf

5
time.c
View file

@ -5703,7 +5703,7 @@ rb_time_zone_abbreviation(VALUE zone, VALUE time)
* == Timezone argument * == Timezone argument
* *
* A timezone argument must have +local_to_utc+ and +utc_to_local+ * 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 +local_to_utc+ method should convert a Time-like object from
* the timezone to UTC, and +utc_to_local+ is the opposite. The * the timezone to UTC, and +utc_to_local+ is the opposite. The
@ -5722,6 +5722,9 @@ rb_time_zone_abbreviation(VALUE zone, VALUE time)
* *
* The +abbr+ method is used by '%Z' in #strftime. * 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 * === Auto conversion to Timezone
* *
* At loading marshaled data, a timezone name will be converted to a timezone * At loading marshaled data, a timezone name will be converted to a timezone