diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,4 +1,4 @@ swh.core[db,http] >= 0.14.0 swh.counters >= v0.8.0 -swh.model >= 4.3.0 +swh.model >= 4.4.0 swh.objstorage >= 0.2.2 diff --git a/swh/storage/postgresql/converters.py b/swh/storage/postgresql/converters.py --- a/swh/storage/postgresql/converters.py +++ b/swh/storage/postgresql/converters.py @@ -138,8 +138,8 @@ return { # PostgreSQL supports isoformatted timestamps "timestamp": timestamp.isoformat(), - "offset": ts_with_tz.offset, - "neg_utc_offset": ts_with_tz.offset == 0 + "offset": ts_with_tz.offset_minutes(), + "neg_utc_offset": ts_with_tz.offset_minutes() == 0 and ts_with_tz.offset_bytes.startswith(b"-"), "offset_bytes": ts_with_tz.offset_bytes, }