method from-posix

Documentation for method from-posix assembled from the following types:

class Instant

From Instant

(Instant) method from-posix

method from-posix($posixBool $prefer-leap-second = 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(915148800True));  # OUTPUT: «1998-12-31T23:59:60Z␤» 
say DateTime.new(Instant.from-posix(915148800));        # OUTPUT: «1999-01-01T00:00:00Z␤»