Rails: times in different time zones -


A room opens 'at 9 a.m. in San Francisco,' I have to record correctly at the time of the train.

  datetime.New (2013,11,19,9,0,0) # It produces GMT: Tuesday, November 19, 2013 09:00: 000000 DateTime.New (2013) , 11,19, 9 0,0) .in_time_zone ("Pacific Time (US and Canada)") # It is also recorded in GMT: Mon, 18 November 2013 01:00 PM PST-08: 00   

I want to get the time because it is locally , that is: Tuesday, November 19, 2013 09:00 pm PST-08: 00 .

How can I do this?

time zone (a list of options available at the rack time: region: all ),

  time_zone = "Pacific Time (US and Canada)"   

You can then:

 < Code> ActiveSupport :: timezone [time_zone] .from ("2013-11-19 9 00:00")    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -