method
new
v8.1.1 -
Show latest stable
- Class:
ActiveSupport::TimeWithZone
new(utc_time, time_zone, local_time = nil, period = nil)public
No documentation available.
# File activesupport/lib/active_support/time_with_zone.rb, line 51
def initialize(utc_time, time_zone, local_time = nil, period = nil)
@time_zone, @time = time_zone, local_time
if utc_time
@utc = transfer_time_values_to_utc_constructor(utc_time)
@period = period
else
@utc = nil
@period = get_period_and_ensure_valid_local_time(period)
end
@is_utc = zone == "UTC" || zone == "UCT"
end