class method self.local_offset

Ruby on Rails 3.2.22.5

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()

DateTimes aren’t aware of DST rules, so use a consistent non-DST offset when creating a DateTime with an offset in the local zone

Source
# File activesupport/lib/active_support/core_ext/date_time/calculations.rb, line 6
    def local_offset
      ::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