All ``POST/PUT`` restFul APIs which returns datetime parameters in the
response contains microseconds whereas `GET` APIs ignores microseconds
part. After a db object is created, it creates the datetime with
microseconds and the subsequent get db calls using the same session
object returns microseconds for the datetime fields.
This patch fixes this issue by overriding `TimestampMixin` to exclude
microseconds part from the datetime fields so that the subsequence get
db calls using the same db session object return datetime fields without
microseconds.
Reviewed: https:/ /review. openstack. org/616068 /git.openstack. org/cgit/ openstack/ masakari/ commit/ ?id=0f8b8c938a6 c334ff95d12399f 152a25f52f69cc
Committed: https:/
Submitter: Zuul
Branch: master
commit 0f8b8c938a6c334 ff95d12399f152a 25f52f69cc
Author: tpatil <email address hidden>
Date: Wed Nov 7 13:31:12 2018 +0900
Fix datetime microsecond discrepancy issue
All ``POST/PUT`` restFul APIs which returns datetime parameters in the
response contains microseconds whereas `GET` APIs ignores microseconds
part. After a db object is created, it creates the datetime with
microseconds and the subsequent get db calls using the same session
object returns microseconds for the datetime fields.
This patch fixes this issue by overriding `TimestampMixin` to exclude
microseconds part from the datetime fields so that the subsequence get
db calls using the same db session object return datetime fields without
microseconds.
Change-Id: Iff6367757c7c28 32bf0c99e09f9c7 a97c428d1cc
Closes-Bug: #1788883