Skip to content

Instantly share code, notes, and snippets.

@thekarladam
Created January 13, 2011 19:40
Show Gist options
  • Save thekarladam/778455 to your computer and use it in GitHub Desktop.
Save thekarladam/778455 to your computer and use it in GitHub Desktop.
Loading development environment (Rails 3.0.1)
>> Time.zone = "Mountain Time (US & Canada)"
>> start = Time.parse("2/9/11 12:30 PM")
=> Wed Feb 09 12:30:00 -0800 2011
>> start.zone
=> "PST"
>> Time.zone
=> #<ActiveSupport::TimeZone:0x1020592b0 @utc_offset=nil, @current_period=nil, @name="Mountain Time (US & Canada)", @tzinfo=#<TZInfo::TimezoneProxy: America/Denver>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment