Last Updated: May 15, 2019
·
7.59K
· sheerun

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: