From dedc6436e52be7f5e71b0b1adc060befc2bf0fe3 Mon Sep 17 00:00:00 2001 From: gord chung Date: Fri, 7 Jul 2017 11:38:39 -0400 Subject: [PATCH] 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 --- ceilometer/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ceilometer/utils.py b/ceilometer/utils.py index 475179314a..26bbad8d67 100644 --- a/ceilometer/utils.py +++ b/ceilometer/utils.py @@ -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):