Get time in given Time Zone
Time.now.in_time_zone("America/New_York")
=> Thu, 04 Oct 2012 08:04:32 EDT -04:00
You can also get current time in other time zone:
Time.parse("2012-06-20 12:20").
in_time_zone("America/New_York")
=> Wed, 20 Jun 2012 06:20:00 EDT -04:00
Written by Adam Stankiewicz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#