require 'tzinfo'
require "active_support/core_ext"
require "time_zone_ext/version"

module TimeZoneExt
  def strptime(date, format)
    if format =~ /%z/i
      Time.strptime(date, format).in_time_zone
    else
      Time.strptime("#{date} zone#{name}", "#{format} zone%z").in_time_zone
    end
  end
end

ActiveSupport::TimeZone.send :include, TimeZoneExt

require 'tzinfo'
require "active_support/core_ext"
require "time_zone_ext/version"

module TimeZoneExt
  def strptime(date, format)
    if format =~ /%z/i
      DateTime.strptime(date, format).in_time_zone
    else
      DateTime.strptime("#{date} zone#{name}", "#{format} zone%z").in_time_zone
    end
  end
end

ActiveSupport::TimeZone.send :include, TimeZoneExt

Use DateTime instaed of Time to support ruby 1.8
Use DateTime instaed of Time to support ruby 1.8
