class method
self.local_offset
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v4.0.13Signature
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