Class TZInfo::TimezonePeriod
In: lib/active_support/vendor/tzinfo-0.3.11/tzinfo/timezone_period.rb
Parent: Object

A period of time in a timezone where the same offset from UTC applies.

All the methods that take times accept instances of Time, DateTime or integer timestamps.

Methods

Attributes

end_transition  [R]  The TimezoneTransitionInfo that defines the end of this TimezonePeriod (may be nil if unbounded).
offset  [R]  The TimezoneOffsetInfo for this period.
start_transition  [R]  The TimezoneTransitionInfo that defines the start of this TimezonePeriod (may be nil if unbounded).

Public Class methods

Public Instance methods

Returns true if this TimezonePeriod is equal to p. This compares the start_transition, end_transition and offset using ==.

The identifier of this period, e.g. "GMT" (Greenwich Mean Time) or "BST" (British Summer Time) for "Europe/London". The returned identifier is a symbol.

true if daylight savings is in effect for this period; otherwise false.

Returns true if this TimezonePeriods is equal to p. This compares the start_transition, end_transition and offset using eql?

Returns a hash of this TimezonePeriod.

Returns internal object state as a programmer-readable string.

true if the given local DateTime is after the start of the period (inclusive); otherwise false.

true if the given local DateTime is before the end of the period (exclusive); otherwise false.

The end time of the period in local time as a DateTime. May be nil if unbounded.

The start time of the period in local time as a DateTime. May be nil if unbounded.

Offset from the local time where daylight savings is in effect (seconds). E.g.: utc_offset could be -5 hours. Normally, std_offset would be 0. During daylight savings, std_offset would typically become +1 hours.

Converts a UTC DateTime to local time based on the offset of this period.

Converts a local DateTime to UTC based on the offset of this period.

true if the given UTC DateTime is after the start of the period (inclusive); otherwise false.

true if the given UTC DateTime is before the end of the period (exclusive); otherwise false.

The end time of the period in UTC as a DateTime. May be nil if unbounded.

Base offset of the timezone from UTC (seconds).

The start time of the period in UTC as a DateTime. May be nil if unbounded.

Total offset from UTC (seconds). Equal to utc_offset + std_offset.

Total offset from UTC (days). Result is a Rational.

true if this period is valid for the given local DateTime; otherwise false.

true if this period is valid for the given UTC DateTime; otherwise false.

zone_identifier()

Alias for abbreviation

[Validate]