from-posix
ErrorsCollection

from-posix

Synthesised documentation from type/Instant

From type/Instant

See Original text in context

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␤»