I have Fri Jun 26 23:05:00 -0400 2009
Which I'd like to convert into Eastern (US) time.
How can this be done with Ruby?
Thanks
I have Fri Jun 26 23:05:00 -0400 2009
Which I'd like to convert into Eastern (US) time.
How can this be done with Ruby?
Thanks
http://tzinfo.rubyforge.org/doc/files/README.html
Part of activesupport
require 'tzinfo'
input_time = Time.parse('Fri Jun 26 23:05:00 -0400 2009')
input_time.utc
puts "input_time = #{input_time}"
est_tz = TZInfo::Timezone.get('EST')
time_in_est = est_tz.utc_to_local(input_time)
puts "time_in_est = #{time_in_est}"
What we're doing here is: