Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • M Meta
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 471
    • Issues 471
    • List
    • Boards
    • Service Desk
    • Milestones
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Platform
  • Meta
  • Issues
  • #3752

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 Jan 08, 2023 by Phabricator Migration user
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking