Timestamp Definition

Timestamp manipulation

Defines timestamp policy for Archivist.

archivist.timestamp.make_timestamp(date_object: datetime)[source]

Format a datetime object into an Archivist format timestamp string

See https://pypi.org/project/rfc3339/

Parameters:

datetime (datetime) -- datetime object

Returns:

string representation of time

archivist.timestamp.now_timestamp()[source]

Return Now as an Archivist format timestamp string

See https://pypi.org/project/rfc3339/

Returns:

string representation of now

archivist.timestamp.parse_timestamp(date_string: str)[source]

Parse an Archivist timestamp to a datetime object

See https://pypi.org/project/iso8601/

Parameters:

date_string (str) -- a string representing date and time in ISO8601 format.

Returns:

datetime object