This is exported from the core library, which means you don't need to import it.
main:
// In this example, we assume the time is 2021-04-21 15:30:35 UTC.
now := Time.now
// By default a time is stringified to UTC.
print now // >> 2021-04-21T15:30:35Z.
print now.utc // >> 2021-04-21T15:30:35Z.
print now.local // >> 2021-04-21T17:30:35.
print now.local.h // >> 17.
summing-duration := Duration.of:
sum := 0
1000.repeat: sum += it
print sum // >> 499500.
print summing-duration // Prints the duration. For example: 1.118ms.
TZ environment variable and calls tzset, thus activating it.
tail -n1 /usr/share/zoneinfo/Europe/Copenhagen
set-timezone "CET-1CEST,M3.5.0,M10.5.0/3" // Central European Timezone (as of 2024).
set-timezone "PST8PDT,M3.2.0,M11.1.0" // Pacific Time (as of 2024).