Method: TZInfo::TimezonePeriod#utc_offset
- Defined in:
- lib/tzinfo/timezone_period.rb
#utc_offset ⇒ Integer
Returns the base offset from UTC in seconds (observed_utc_offset -
std_offset
). This does not include any adjustment made for daylight
savings time and will typically remain constant throughout the year.
To obtain the currently observed offset from UTC, including the effect of daylight savings time, use #observed_utc_offset instead.
If you require accurate #base_utc_offset values, you should install the tzinfo-data gem and set DataSources::RubyDataSource as the DataSource. When using DataSources::ZoneinfoDataSource, the value of #base_utc_offset has to be derived from changes to the observed UTC offset and DST status since it is not included in zoneinfo files.
57 58 59 |
# File 'lib/tzinfo/timezone_period.rb', line 57 def base_utc_offset @offset.base_utc_offset end |