timestamp parsed into utc instead of localtime(which was default)

Closes Bug:#160531

Change-Id: I74454eda759af5dfaf33b58b4ea18142350129b0
This commit is contained in:
Michael Dong 2016-07-14 14:06:58 -07:00
parent 90b20bfd41
commit bbf977a501
2 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ class RollupQuantity(SetterComponent):
row, "min(firstrecord_timestamp_unix)",
Component.DEFAULT_UNAVAILABLE_VALUE)
earliest_record_timestamp_string = \
datetime.datetime.fromtimestamp(
datetime.datetime.utcfromtimestamp(
earliest_record_timestamp_unix).strftime(
'%Y-%m-%d %H:%M:%S')
@ -92,7 +92,7 @@ class RollupQuantity(SetterComponent):
row, "max(lastrecord_timestamp_unix)",
Component.DEFAULT_UNAVAILABLE_VALUE)
latest_record_timestamp_string = \
datetime.datetime.fromtimestamp(
datetime.datetime.utcfromtimestamp(
latest_record_timestamp_unix).strftime('%Y-%m-%d %H:%M:%S')
# record count

View File

@ -184,7 +184,7 @@ class FetchQuantity(UsageComponent):
row, "min(event_timestamp_unix_for_min)",
Component.DEFAULT_UNAVAILABLE_VALUE)
earliest_record_timestamp_string = \
datetime.datetime.fromtimestamp(
datetime.datetime.utcfromtimestamp(
earliest_record_timestamp_unix).strftime(
'%Y-%m-%d %H:%M:%S')
@ -193,7 +193,7 @@ class FetchQuantity(UsageComponent):
row, "max(event_timestamp_unix_for_max)",
Component.DEFAULT_UNAVAILABLE_VALUE)
latest_record_timestamp_string = \
datetime.datetime.fromtimestamp(
datetime.datetime.utcfromtimestamp(
latest_record_timestamp_unix).strftime('%Y-%m-%d %H:%M:%S')
# record count