class method self.local_offset

Ruby on Rails 4.0.13

Since v3.0.20 Last seen in v4.0.13

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13

Signature

self.local_offset()

DEPRECATED: Use DateTime.civil_from_format directly.

Source
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 6
    def local_offset
      ActiveSupport::Deprecation.warn 'DateTime.local_offset is deprecated. Use DateTime.civil_from_format directly.'

      ::Time.local(2012).utc_offset.to_r / 86400
    end

Defined in activesupport/lib/active_support/core_ext/date_time/calculations.rb line 6 · View on GitHub · Improve this page · Find usages on GitHub

Defined in DateTime

Type at least 2 characters to search.

↑↓ navigate · open · esc close