Skip to content

Store/represent time offsets as strings

instead of int + negative_utc boolean

The plan:

  1. Add offset_bytes attribute to TimestampWithTimezone, fill it from offset and negative_utc if not provided
  2. Make offset and negative_utc optional (fill the attributes from offset_bytes)
  3. Raise DeprecationWarning when they are passed to the constructor (but from_dict should not raise it)
  4. Remove explicit uses in the constructor (track down deprecation warnings)
  5. Remove use of negative_utc (there is one in swh-web/swh/web/common/converters.py)
  6. Remove them from the constructor (but not from_dict, because kafka), remove offset and negative_utc entirely
  7. Rename offset_bytes to offset

Postgresql must be migrated somewhere between 1 and 6 (exclusive). Kafka does not need to be migratet as long as we keep the compat in from_dict methods.


Migrated from T3752 (view on Phabricator)

Edited by Phabricator Migration user
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information