Since we're comparing local time to database time, we need to correctly
handle negative offsets to account for clock skew. The datetime.timedelta
class always reports a positive number of seconds, but with a possibly
negative number of *days*. Therefore, take the days into account.
Change-Id: I4422e4cf41cb57cdc89548d01b0abc27cda914ef
Closes-Bug: #1688327
(cherry picked from commit f3f05c9a3f6109ec1e102ac9677accb82eb6cc54)
Reviewed: https:/ /review. openstack. org/469937 /git.openstack. org/cgit/ openstack/ heat/commit/ ?id=8c8e15c9ceb 181a17b5c006fae 2d48ad3a13e6fc
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 8c8e15c9ceb181a 17b5c006fae2d48 ad3a13e6fc
Author: Zane Bitter <email address hidden>
Date: Thu May 4 11:41:55 2017 -0400
Deal correctly with negative elapsed time
Since we're comparing local time to database time, we need to correctly
handle negative offsets to account for clock skew. The datetime.timedelta
class always reports a positive number of seconds, but with a possibly
negative number of *days*. Therefore, take the days into account.
Change-Id: I4422e4cf41cb57 cdc89548d01b0ab c27cda914ef c1e102ac9677acc b82eb6cc54)
Closes-Bug: #1688327
(cherry picked from commit f3f05c9a3f6109e