]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
python-common: fix test_datetime_to_str_2 on non-UTC hosts 39296/head
authorSage Weil <sage@newdream.net>
Wed, 27 Jan 2021 21:44:21 +0000 (15:44 -0600)
committerSebastian Wagner <sebastian.wagner@suse.com>
Thu, 4 Feb 2021 13:41:35 +0000 (14:41 +0100)
commitddc78ebfa795eecedaf70a23116390bee635e9da
tree4a617d52c2e6470498f753abefc7456139bb8c2d
parent47c1ec25168ce6c1b2bef0bc5cd1907b9bae080a
python-common: fix test_datetime_to_str_2 on non-UTC hosts

The old test parsed to a datetime without a tz, which was interpreted as
the local time zone when rendering back to a string.  Specify that it's a
UTC datetime so that behavior is consistent regardless of the test host
timezone.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 78aca4db249c409d0cd5a24bfae81e55cf930bc3)
src/python-common/ceph/tests/test_datetime.py