summaryrefslogtreecommitdiff
path: root/systemd/test/test_journal.py
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/test/test_journal.py')
-rw-r--r--systemd/test/test_journal.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/systemd/test/test_journal.py b/systemd/test/test_journal.py
index 2f3cd3b..e6761ca 100644
--- a/systemd/test/test_journal.py
+++ b/systemd/test/test_journal.py
@@ -290,6 +290,18 @@ def test_reader_convert_entry(tmpdir):
'x2' : ['YYY', 'YYY'],
'y2' : [b'\200\200', b'\200\201']}
+def test_reader_convert_timestamps(tmpdir):
+ j = journal.Reader(path=tmpdir.strpath)
+
+ val = j._convert_field('_SOURCE_REALTIME_TIMESTAMP', 1641651559324187)
+ assert val.tzinfo is not None
+
+ val = j._convert_field('__REALTIME_TIMESTAMP', 1641651559324187)
+ assert val.tzinfo is not None
+
+ val = j._convert_field('COREDUMP_TIMESTAMP', 1641651559324187)
+ assert val.tzinfo is not None
+
def test_seek_realtime(tmpdir):
j = journal.Reader(path=tmpdir.strpath)