convert_and_validate_timestamp_as_int#

convert_and_validate_timestamp_as_int(timestamp)[source]#

Serialise timestamp as UNIX epoch seconds UTC.

Needed when we need to have time based keys in our state, as the current JSON encoder cannot directly encode datetime.datetime keys/

Parameters

timestamp (Union[Timestamp, datetime]) –

Return type

int