klyn.time.DateTime.nowUTC
property
public static readonly property nowUTC as DateTime
Description

Returns the current date and time in UTC.

This property identifies the same kind of absolute instant as DateTime.now, but exposes its calendar components with a zero UTC offset. Use it for protocols, persistence formats, and comparisons that require a timezone-independent reference.

Returns

A DateTime object representing the current UTC date and time.

Example
import klyn.time

utc = DateTime.nowUTC
print(utc.toString("%Y-%m-%d %H:%M:%S %z"))
assert utc.timeZone == TimeZone.UTC