- integer puzzle.GetExpirationTime()
- Get the date and time that the puzzle expires.
- V1 Function Name
- New to V2
puzzle.GetExpirationTime returns the expiration time of the puzzle in Lua time format. The expiration time is expressed as the number of seconds since a certain "epoch" date, and is always positive.
This example gives the amount of time left in the puzzle in seconds.
local timeLeft = os.difftime ( puzzle.GetExpirationTime(), os.time() ) print ( "Time left in seconds: " .. timeLeft )
After the puzzle expires, time left in seconds will be a negative number.