HoraTimezone class
Represents a fixed-offset timezone.
- Annotations
-
- @immutable
Constructors
- HoraTimezone.fromMinutes(int totalMinutes, {String? name})
-
Creates a timezone from total offset minutes.
factory
- HoraTimezone.fromOffset(int hours, {int minutes = 0, String? name})
-
Creates a timezone from UTC offset hours and minutes.
factory
- HoraTimezone.local([DateTime? at])
-
Creates local system timezone at
atinstant (uses system/DST rules).factory - HoraTimezone.parse(String input)
-
Parses timezone text.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isUtc → bool
-
Whether offset is UTC.
no setter
- name → String
-
Display name or identifier.
no setter
- offset → Duration
-
UTC offset.
final
- offsetHours → double
-
Offset in hours (fractional if needed).
no setter
- offsetMinutes → int
-
Offset in minutes.
no setter
- offsetString → String
-
Formats offset as
+HH:mm.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 (fixed offsets only, no IANA database).
final
Static Methods
-
tryParse(
String input) → HoraTimezone? - Parses timezone text and returns null instead of throwing.
Constants
- utc → const HoraTimezone
- UTC timezone.