kdbxtool.models.times¶
Timestamp handling for KDBX elements.
Classes
|
Timestamps associated with entries and groups. |
- class kdbxtool.models.times.Times(creation_time=<factory>, last_modification_time=<factory>, last_access_time=<factory>, expiry_time=None, expires=False, usage_count=0, location_changed=None)[source]¶
Bases:
objectTimestamps associated with entries and groups.
All times are stored as timezone-aware UTC datetimes.
- Parameters:
- creation_time¶
When the element was created
- Type:
- last_modification_time¶
When the element was last modified
- Type:
- last_access_time¶
When the element was last accessed
- Type:
- expiry_time¶
When the element expires (if expires is True)
- Type:
datetime.datetime | None
- location_changed¶
When the element was moved to a different group
- Type:
datetime.datetime | None
- property expired: bool¶
Check if the element has expired.
- Returns:
True if expires is True and expiry_time is in the past
- touch(modify=False)[source]¶
Update access time, and optionally modification time.
- Parameters:
modify (bool) – If True, also update modification time
- Return type:
None
- update_location()[source]¶
Update location_changed timestamp when element is moved.
- Return type:
None
- classmethod create_new(expires=False, expiry_time=None)[source]¶
Create timestamps for a new element.
- __init__(creation_time=<factory>, last_modification_time=<factory>, last_access_time=<factory>, expiry_time=None, expires=False, usage_count=0, location_changed=None)¶