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:
parent
9360743ccb
commit
dedc6436e5
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue