method
local_offset
rails latest stable - Class:
DateTime
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v4.0.2) is shown here.
local_offset()public
DEPRECATED: Use DateTime.civil_from_format directly.
# 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 Related methods
- Instance methods
- <=>
- acts_like_date?
- acts_like_time?
- advance
- ago
- as_json
- at_beginning_of_day
- at_beginning_of_hour
- at_beginning_of_minute
- at_end_of_day
- at_end_of_hour
- at_end_of_minute
- at_midnight
- beginning_of_day
- beginning_of_hour
- beginning_of_minute
- change
- default_inspect
- end_of_day
- end_of_hour
- end_of_minute
- formatted_offset
- future?
- getutc
- in
- in_time_zone
- inspect
- midnight
- nsec
- past?
- readable_inspect
- seconds_since_midnight
- seconds_until_end_of_day
- since
- to_default_s
- to_f
- to_formatted_s
- to_i
- to_s
- usec
- utc
- utc?
- utc_offset
- Class methods
- civil_from_format
- current
- local_offset
- Private methods
-
offset_in_seconds -
seconds_since_unix_epoch