HoraTimezone class
Represents a timezone with a fixed UTC offset.
This is a simplified representation. For full timezone
support with DST handling, use the timezone package.
- Annotations
-
- @immutable
Constructors
- HoraTimezone.fromMinutes(int totalMinutes)
-
Creates a timezone from a total offset in minutes.
factory
- HoraTimezone.fromOffset(int hours, [int minutes = 0])
-
Creates a timezone from a UTC offset in hours.
factory
- HoraTimezone.parse(String input)
-
Parses a timezone string like "+05:30" or "-08:00".
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
The timezone name/identifier.
no setter
- offset → Duration
-
The UTC offset.
final
- offsetHours → double
-
The offset in hours (may be fractional).
no setter
- offsetMinutes → int
-
The offset in minutes.
no setter
- offsetString → String
-
Formats the offset as a string like "+05:30".
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
-
common
→ Map<
String, HoraTimezone> -
Common timezone abbreviations (simplified, no DST).
final
Constants
- utc → const HoraTimezone
- UTC timezone.