Documentation for method from-posix
assembled from the following pages:
Class: Instant §
From Instant
(Instant) method from-posix §
method from-posix(, Bool = False)
Converts the POSIX timestamp $posix
to an Instant. If $prefer-leap-second
is True
, the return value will be the first of the two possible seconds in the case of a leap second.
say DateTime.new(Instant.from-posix(915148800, True)); # OUTPUT: «1998-12-31T23:59:60Z» say DateTime.new(Instant.from-posix(915148800)); # OUTPUT: «1999-01-01T00:00:00Z»