Parse Time in given TimeZone
ActiveSupport::TimeZone["America/New_York"].
parse("2012-06-29 12:20")
=> Fri, 29 Jun 2012 12:20:00 EDT -04:00
You can also get current time in other time zone:
ActiveSupport::TimeZone["America/New_York"].now
=> Thu, 04 Oct 2012 08:02:45 EDT -04:00
See also:
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#