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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -