Sha256: 6fbe66f536bbea5f00dde7c2c14dc916aae1cbf26d5c9d249bb128fe9a3b4bdd
Contents?: true
Size: 377 Bytes
Versions: 1
Compression:
Stored size: 377 Bytes
Contents
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#{formatted_offset}", "#{format} zone%z").in_time_zone end end end ActiveSupport::TimeZone.send :include, TimeZoneExt
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
time_zone_ext-0.0.3 | lib/time_zone_ext.rb |