dissect.target.plugins.os.default.datetime¶
Module Contents¶
Classes¶
Generic implementation for datetime plugin. |
- class dissect.target.plugins.os.default.datetime.DateTimePlugin(target: dissect.target.target.Target)¶
Bases:
dissect.target.plugin.PluginGeneric implementation for datetime plugin.
- __namespace__ = 'datetime'¶
Defines the plugin namespace.
- check_compatible() None¶
Perform a compatibility check with the target.
This function should return
Noneif the plugin is compatible with the current target (self.target). For example, check if a certain file exists. Otherwise it should raise anUnsupportedPluginError.- Raises:
UnsupportedPluginError – If the plugin could not be loaded.
- tz(name: str) datetime.tzinfo¶
- tzinfo() datetime.tzinfo¶
Return a
datetime.tzinfoof the current system timezone.
- local(dt: datetime.datetime) datetime.datetime¶
Replace the
tzinfoof a givendatetime.datetimeobject with the current systemtzinfo.Does not perform any conversion.
- to_utc(dt: datetime.datetime) datetime.datetime¶
Convert any
datetime.datetimeobject into a UTCdatetime.datetimeobject.First replaces the current
tzinfowith the systemtzinfowithout conversion, then converts it to an aware UTCdatetimeobject.