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")
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
Post a Comment