Converting Between Time Zones : Time Zones « Time « Ruby






Converting Between Time Zones


puts now = Time.now                # => Sat Mar 18 20:15:58 EST 2006
puts now = now.gmtime              # => Sun Mar 19 01:15:58 UTC 2006
puts now = now.localtime           # => Sat Mar 18 20:15:58 EST 2006

 

Related examples in the same category

1.Convert time to time zone