]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Avoid timezone confusion
authorVeronika Kabatova <vkabatov@redhat.com>
Thu, 22 Feb 2018 15:24:46 +0000 (16:24 +0100)
committerDaniel Axtens <dja@axtens.net>
Wed, 7 Mar 2018 14:28:11 +0000 (01:28 +1100)
commit8465e33c23310e4873d464fe2581842df2e9c6f8
treedc5c933f797f0548143ffecf9c1b9dfbacba6dfc
parent5e0e06db42ffd62a7258448ea21e4a5ca5e7430b
Avoid timezone confusion

Patchwork saves patches, comments etc with UTC timezone and reports
this time when opening the patch details. However, internally generated
processes such as events are reported with the instance's local time.
There's nothing wrong with that and making PW timezone-aware would add
useless complexity, but in a world-wide collaboration a lot of confusion
may arise as the timezone is not reported at all. Instance's local time
might be very different from the local time of CI integrating with PW,
which is different from the local time of person dealing with it etc.

Use UTC everywhere by default instead of UTC for sumbissions and local
timezone for internally generated events (which is not reported).

Signed-off-by: Veronika Kabatova <vkabatov@redhat.com>
[dja:
 - squash 2 patches: https://patchwork.ozlabs.org/patch/876744/
                     https://patchwork.ozlabs.org/patch/877815/
 - minor changes to both patches - rejig order of migrations and
   adjust wording: "happened sooner" -> "happened earlier"]
Tested-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Daniel Axtens <dja@axtens.net>
docs/api/rest.rst
patchwork/migrations/0023_timezone_unify.py [new file with mode: 0644]
patchwork/models.py
patchwork/notifications.py
patchwork/signals.py
patchwork/templates/patchwork/submission.html
patchwork/tests/test_checks.py
patchwork/tests/test_expiry.py
patchwork/tests/test_notifications.py
patchwork/tests/utils.py
releasenotes/notes/unify-timezones-0f7022f0c2a371be.yaml [new file with mode: 0644]