explicitly note sanitize_timestamp return condition

we shouldn't use sanitize_timestamp as it strips the timezone info.
it's really only useful on query filtering since we store in utc.

Change-Id: I6419bea62d139574dfa9e949bba4cdf8931803e7
Related-Bug: #1483564
This commit is contained in:
gord chung 2017-07-07 11:38:39 -04:00
parent 9360743ccb
commit dedc6436e5
1 changed files with 4 additions and 1 deletions

View File

@ -138,7 +138,10 @@ def decimal_to_dt(dec):
def sanitize_timestamp(timestamp):
"""Return a naive utc datetime object."""
"""Return a naive utc datetime object.
:returns: a timezone unaware timestamp
"""
if not timestamp:
return timestamp
if not isinstance(timestamp, datetime.datetime):