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.

The built-in functions os.difftime and os.time can be used to convert the expiration into different formats.

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.