diff options
Diffstat (limited to 'src/python-systemd/journal.py')
-rw-r--r-- | src/python-systemd/journal.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/python-systemd/journal.py b/src/python-systemd/journal.py index db35ba2005..46affcee00 100644 --- a/src/python-systemd/journal.py +++ b/src/python-systemd/journal.py @@ -123,6 +123,16 @@ class Journal(_Journal): return set(self._convert_field(key, value) for value in super(Journal, self).query_unique(key)) + def seek_realtime(self, timestamp): + if isinstance(timestamp, datetime.datetime): + timestamp = int(timestamp.strftime("%s%f")) + return super(Journal, self).seek_realtime(timestamp) + + def seek_monotonic(self, timestamp, bootid=None): + if isinstance(timestamp, datetime.timedelta): + timestamp = timestamp.totalseconds() + return super(Journal, self).seek_monotonic(timestamp, bootid) + def log_level(self, level): """Sets maximum log level by setting matches for PRIORITY.""" if 0 <= level <= 7: |