Documentation for method to-posix assembled from the following pages:

Class: Instant §

From Instant

(Instant) method to-posix §

method to-posix()

Converts the invocant to a POSIX timestamp and returns a two element list containing the POSIX timestamp and a Bool. It is the inverse of method from-posix, except that the second return value is True if *and only if* this Instant is in a leap second.

say DateTime.new("1999-01-01T00:00:00Z").Instant.to-posix# OUTPUT: «(915148800 False)␤» 
say DateTime.new('1998-12-31T23:59:60Z').Instant.to-posix# OUTPUT: «(915148800 True)␤»