Skip to content

Instantly share code, notes, and snippets.

@efatsi
Created October 22, 2012 20:11
Show Gist options
  • Select an option

  • Save efatsi/3933804 to your computer and use it in GitHub Desktop.

Select an option

Save efatsi/3933804 to your computer and use it in GitHub Desktop.
Time.zone = ActiveSupport::TimeZone[-6].name
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15))
got: "Saturday July 7th from 9:30 to 10:15 AM"
Time.zone = ActiveSupport::TimeZone[-5].name
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15))
got: "Saturday July 7th from 10:30 to 11:15 AM"
Time.zone = ActiveSupport::TimeZone[-4].name
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15))
got: "Saturday July 7th from 12:30 to 1:15 PM"
Time.zone = ActiveSupport::TimeZone[-3].name
InterviewSlot.new(:start_time => Time.new(2012, 7, 7, 11, 30), :end_time => Time.new(2012, 7, 7, 12, 15))
got: "Saturday July 7th from 12:30 to 1:15 PM"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment