klyn.time.TimeZone.TimeZone
constructor
public TimeZone(name as String, offsetHours as Int, minuteOffset as Int = 0):
Description

Constructs a TimeZone object with a given name and offset.

Parameters
ParameterDescription
nameThe name of the time zone.
offsetHoursThe offset in whole hours from UTC.
minuteOffsetSigned minute component of the UTC offset.
Throws
  • ValueException if an offset component is outside its valid range.
Example
import klyn.time

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