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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -