timestamp – Tools for representing MongoDB internal Timestamps

    class (time, inc)

    Create a new Timestamp.

    This class is only for use with the MongoDB opLog. If you need to store a regular timestamp, please use a .

    • as_datetime()

      Return a datetime instance corresponding to the time portion of this .

      The returned datetime’s timezone is UTC.

    • time

      Get the time portion of this Timestamp.