class TZInfo::Timezone
def to_local(time)
-
(ArgumentError)- if `time` is a {Timestamp} that does not have a -
(ArgumentError)- if `time` is `nil`.
Returns:
-
(Object)- the local equivalent of `time` as a {TimeWithOffset},
Parameters:
-
time(Object) -- a `Time`, `DateTime` or {Timestamp}.
def to_local(time) raise ArgumentError, 'time must be specified' unless time Timestamp.for(time) do |ts| TimestampWithOffset.set_timezone_offset(ts, period_for(ts).offset) end end