Skip to content
On this page

Timestamps

SmartPy's type for timestamps is sp.timestamp.

sp.timestamp(n) → sp.timestamp

sp.timestamp(n) refers to the moment in time n seconds since the Epoch. For example, sp.timestamp(1571659294) represents 2019-10-21T12:01:34Z.

sp.add_seconds(t: sp.timestamp, secs: sp.int) → sp.timestamp

Adds secs seconds to t.