klyn.time.DateTime.fromTimestamp
method
public static fromTimestamp(timestamp as Timestamp, timeZone as TimeZone = TimeZone.UTC) as DateTime:
Description
Constructs a DateTime object from a timestamp.
import klyn.time

timestamp = Timestamp.now
dateTime = DateTime.fromTimestamp(timestamp)
Parameters
  • timestamp The timestamp representing the date and time.
  • timeZone Target timezone.
Returns
A new DateTime object. ``` import klyn.time timestamp = Timestamp.now dateTime = DateTime.fromTimestamp(timestamp) ```