public DateTime(epochSeconds as Double, timeZone as TimeZone = TimeZone.local):
Constructs a DateTime from an epoch timestamp expressed in seconds.
| Parameter | Description |
|---|---|
epochSeconds | Number of seconds elapsed since 1970-01-01 00:00:00 UTC. |
timeZone | Target timezone used for exposed components, defaulting to TimeZone.local. |
import klyn.time local = DateTime(time()) utc = DateTime(time(), TimeZone.UTC) assert local.timeZone == TimeZone.local assert utc.timeZone == TimeZone.UTC