Sha256: 0c371a3471719976fd5d45bf1b1fb2af368e34bb18d3ceb8e48e2d965f5f436e

Contents?: true

Size: 347 Bytes

Versions: 36

Compression:

Stored size: 347 Bytes

Contents

require 'active_support/time'

module Oj

  # 
  class ActiveSupportHelper

    def self.createTimeWithZone(utc, zone)
      ActiveSupport::TimeWithZone.new(utc - utc.gmt_offset, ActiveSupport::TimeZone[zone])
    end
  end

end

Oj.register_odd(ActiveSupport::TimeWithZone, Oj::ActiveSupportHelper, :createTimeWithZone, :utc, 'time_zone.name')

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
oj-2.17.1 lib/oj/active_support_helper.rb
oj-2.17.0 lib/oj/active_support_helper.rb
oj-2.16.1 lib/oj/active_support_helper.rb
oj-2.16.0 lib/oj/active_support_helper.rb
oj-2.15.1 lib/oj/active_support_helper.rb
oj-2.15.0 lib/oj/active_support_helper.rb
oj-2.14.6 lib/oj/active_support_helper.rb
oj-2.14.5 lib/oj/active_support_helper.rb
oj-2.14.4 lib/oj/active_support_helper.rb
oj-2.14.3 lib/oj/active_support_helper.rb
oj-2.14.2 lib/oj/active_support_helper.rb
oj-2.14.1 lib/oj/active_support_helper.rb
oj-2.14.0 lib/oj/active_support_helper.rb
oj-2.13.1 lib/oj/active_support_helper.rb
oj-2.13.0 lib/oj/active_support_helper.rb
oj-2.12.14 lib/oj/active_support_helper.rb
oj-2.12.13 lib/oj/active_support_helper.rb
oj-2.12.12 lib/oj/active_support_helper.rb
oj-2.12.11 lib/oj/active_support_helper.rb
oj-2.12.10 lib/oj/active_support_helper.rb