ZoneOffset class Absolute times

A time zone offset from UTC.

Zone offsets can range from UTC-23:59:59 to UTC+23:59:59, although as of this writing, the largest offset in use is UTC+14:00 for the island of Kiritimati.

Implementers
Annotations
  • @immutable

Constructors

ZoneOffset.new(int hours, [int minutes = 0, int seconds = 0])
Construct a new ZoneOffset.
ZoneOffset.fromDuration(Duration amount)
Constructs a new ZoneOffset from a Duration.
ZoneOffset.fromTimespan(Timespan amount)
Constructs a new ZoneOffset from a Timespan.
ZoneOffset.local()
Provides the platform's current default zone offset.
factory
ZoneOffset.parse(String offset)
Parses an ISO 8601 zone offset string.
factory

Properties

asTimespan Timespan
Converts this to a Timespan.
no setter
hashCode int
The hash code for this object.
no setteroverride
hours int
UTC offset hours [-23 to +23].
final
minutes int
UTC offset minutes [-59 to +59].
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seconds int
UTC offset seconds [-59 to +59].
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Converts this to an ISO 8601 zone offset string.
override

Operators

operator ==(Object other) bool
Equality operator.
override