File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
activesupport/lib/active_support/values Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,9 @@ def find_tzinfo(name)
208
208
TZInfo ::Timezone . get ( MAPPING [ name ] || name )
209
209
end
210
210
211
+ # :stopdoc:
211
212
alias_method :create , :new
213
+ # :startdoc:
212
214
213
215
# Returns a TimeZone instance with the given name, or +nil+ if no
214
216
# such TimeZone instance exists. (This exists to support the use of
@@ -296,15 +298,22 @@ def zones_map
296
298
attr_reader :name
297
299
attr_reader :tzinfo
298
300
301
+ ##
302
+ # :singleton-method: create
303
+ # :call-seq: create(name, utc_offset = nil, tzinfo = nil)
304
+ #
299
305
# Create a new TimeZone object with the given name and offset. The
300
306
# offset is the number of seconds that this time zone is offset from UTC
301
307
# (GMT). Seconds were chosen as the offset unit because that is the unit
302
308
# that Ruby uses to represent time zone offsets (see Time#utc_offset).
309
+
310
+ # :stopdoc:
303
311
def initialize ( name , utc_offset = nil , tzinfo = nil )
304
312
@name = name
305
313
@utc_offset = utc_offset
306
314
@tzinfo = tzinfo || TimeZone . find_tzinfo ( name )
307
315
end
316
+ # :startdoc:
308
317
309
318
# Returns the offset of this time zone from UTC in seconds.
310
319
def utc_offset
You can’t perform that action at this time.
0 commit comments