TimeZone
class in package klyn.time

    public class TimeZone extends Object implements ValueType:

Object
└ TimeZone
All Implemented Interfaces: ValueType

Represents a time zone, including its name and offset from UTC.

This class provides predefined time zones and methods to create and manipulate time zone objects. It includes static properties for common time zones and methods to convert between time zone names and objects.

    import klyn.time

    timeZone = TimeZone.GMT
    print(timeZone.toString())  # Output: GMT (UTC+0)

Properties

Modifier and Type | Member | Description
--- | --- | ---
public static readonly property | UTC `UTC as TimeZone:` | UTC timezone.
public static readonly property | local `local as TimeZone:` | Local timezone (best-effort, currently UTC by default).
public readonly property | name `name as String:` | IANA-like short identifier (examples: UTC, CET).
public readonly property | offsetHours `offsetHours as Int:` | Offset from UTC in hours.
public readonly property | offsetMinutes `offsetMinutes as Int:` | Total offset from UTC in minutes.

Inherited Properties
property Inherited Properties from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | TimeZone `TimeZone(name as String, offsetHours as Int, minuteOffset as Int = 0):` | Constructs a TimeZone object with a given name and offset.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public override | toString `toString() as String:` | Returns a string representation of this TimeZone object.

Inherited Methods
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml