DateTimeZoneProvider class abstract

Provides stable, performant time zone data.

Consumers should be able to treat an DateTimeZoneProvider like a cache: lookups should be quick (after at most one lookup of a given ID), and multiple calls for a given ID must always return references to equal instances, even if they are not references to a single instance. Consumers should not feel the need to cache data accessed through this interface. Implementations designed to work with any DateTimeZoneSource implementation (such as DateTimeZoneCache) should not attempt to handle exceptions thrown by the source. A source-specific provider may do so, as it has more detailed knowledge of what can go wrong and how it can best be handled.

Implementers
Annotations
  • @interface

Constructors

DateTimeZoneProvider()

Properties

hashCode int
The hash code for this object.
no setterinherited
ids List<String>
Gets the list of valid time zone ids advertised by this provider.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
versionId String?
Gets the version ID of this provider.
latefinal

Methods

getAllZones() Future<Iterable<DateTimeZone>>
Returns a sequence of time zones from the specified provider, in the same order in which the IDs are returned by the provider.
getCachedSystemDefault() DateTimeZone
getDateTimeZoneSync(String id) DateTimeZone
getSystemDefault() Future<DateTimeZone>
Gets the time zone from this provider that matches the system default time zone, if a matching time zone is available.
getZoneOrNull(String id) Future<DateTimeZone?>
Returns the time zone for the given ID, if it's available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](String id) Future<DateTimeZone>
Returns the time zone for the given ID.