public toDateTime(timeZone as TimeZone = TimeZone.local) as DateTime:
Converts this Timestamp to a DateTime object.
| Parameter | Description |
|---|---|
timeZone | Target timezone used for exposed calendar components, defaulting to TimeZone.local. |
A DateTime object representing the same point in time.
import klyn.time timestamp = Timestamp.now dateTime = timestamp.toDateTime() print(dateTime.toString()) assert dateTime.timeZone == TimeZone.local