Skip to content

Time and date

This content is not available in your language yet.

How to get the current time

Use the now() method to obtain the current standard Unix time.

If you need to store the time in state or encode it in a message, use the following serialization: Int as uint32.

let currentTime: Int = now();
if (currentTime > 1672080143) {
// do something
}