diff options
author | Philipp Hörist <philipp@hoerist.com> | 2022-10-09 16:15:26 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2022-10-09 20:32:26 +0300 |
commit | 659ef014485b5c25e37bfd504c38bfaf2a16aef5 (patch) | |
tree | d0cf0a42e6e9e6f6ecf7f7e9554bff61e8d92532 | |
parent | 6ca265f1af0760deb67ed16170335b7ce54cc00d (diff) |
refactor: Archive: Simplify setting earliest timestamp
-rw-r--r-- | gajim/common/storage/archive.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gajim/common/storage/archive.py b/gajim/common/storage/archive.py index 5b98ef411..8e45b76c5 100644 --- a/gajim/common/storage/archive.py +++ b/gajim/common/storage/archive.py @@ -566,9 +566,8 @@ class MessageArchiveStorage(SqliteStorage): else: before_ts = before.timestamp() - if after is None: - after_ts = datetime.datetime(1971, 1, 1).timestamp() - else: + after_ts = 0 + if after is not None: after_ts = after.timestamp() if from_users is None: @@ -644,9 +643,8 @@ class MessageArchiveStorage(SqliteStorage): else: before_ts = before.timestamp() - if after is None: - after_ts = datetime.datetime(1971, 1, 1).timestamp() - else: + after_ts = 0 + if after is not None: after_ts = after.timestamp() if from_users is None: |