ruby on rails - How to set the timezone and get the time all in one line of code? -


time.zone = 'hawaii'  # => "hawaii" time.zone.now         # => wed, 23 jan 2008 20:24:27 hst -10:00 

i time.zone('hawaii').now

time.now.in_time_zone("hawaii") 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -