Comment 2 for bug 1788883

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to masakari (master)

Reviewed: https://review.openstack.org/616068
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=0f8b8c938a6c334ff95d12399f152a25f52f69cc
Submitter: Zuul
Branch: master

commit 0f8b8c938a6c334ff95d12399f152a25f52f69cc
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: Iff6367757c7c2832bf0c99e09f9c7a97c428d1cc
    Closes-Bug: #1788883