Use UTC for the timezone in functional tests

The prior code uses the local time zone, in my case
prsently 'PST' which pytz doesn't grok, however it does
grok UTC, and CI runs in UTC, and the API, as far as I know,
conveys in UTC. So this should just be for consistency.

Change-Id: Ia47b6adfc18be54f8e9623b34ef34b66436828dc
This commit is contained in:
Julia Kreger 2023-02-21 08:38:26 -08:00
parent 933c4f8d10
commit 836ba11b9b
1 changed files with 3 additions and 1 deletions

View File

@ -231,8 +231,10 @@ class Base(base.NodeTest):
error=error),
status
)
# CI Runs in UTC, local machines can fail on the use of the local
# timezone.
curr_time = datetime.datetime.fromtimestamp(
time.time(), tz=pytz.timezone(time.tzname[0]))
time.time(), tz=pytz.timezone('UTC'))
started_at = timeutils.parse_isotime(status['started_at'])
self.assertLess(started_at, curr_time)
if finished: