Timezone class

A named timezone with numeric offset and descriptive metadata

In JSON format, the instance for Afghanistan might look like:

{
   "zoneName": "Asia\/Kabul",
   "gmtOffset": 16200,
   "gmtOffsetName": "UTC+04:30",
   "abbreviation": "AFT",
   "tzName": "Afghanistan Time"
}
Inheritance
Annotations
  • @immutable
  • @JsonSerializable.new()

Constructors

Timezone({required String abbreviation, required int gmtOffset, required String gmtOffsetName, required String tzName, required String zoneName})
const
Timezone.fromJson(Map<String, dynamic> json)
factory

Properties

abbreviation → String
The timezone common abbreviation, like AFT for Asia/Kabul
final
gmtOffset → int
The numeric offset in seconds from GMT
final
gmtOffsetName → String
The name of the offset value, like UTC+04:30
final
hashCode → int
The hash code for this object.
no setterinherited
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
tzName → String
The timezone common full name, like Afghanistan Time
final
zoneName → String
The name of the timezone, like Asia/Kabul
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited