public Method

TimeZone.new(*args)

Method for creating new ActiveSupport::TimeWithZone instance in time zone of self. Example:

Time.zone = "Hawaii"                    # => "Hawaii"
Time.zone.new(2007, 2, 1, 15, 30, 45)   # => Thu, 01 Feb 2007 15:30:45 HST -10:00

Source Code

# File active_support/values/time_zone.rb, line 182
def new(*args)
  Time.utc_time(*args).change_time_zone(self)
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.