Store build start/end time in UTC
Always store build times in UTC instead of local time. This may lead to a mix of timezones since the old build times are still stored in local time. Change-Id: Ie0cfce385854caa5adbd27f7f13042e7bfd41f1b
This commit is contained in:
@@ -69,9 +69,13 @@ class SQLReporter(BaseReporter):
|
||||
|
||||
start = end = None
|
||||
if build.start_time:
|
||||
start = datetime.datetime.fromtimestamp(build.start_time)
|
||||
start = datetime.datetime.fromtimestamp(
|
||||
build.start_time,
|
||||
tz=datetime.timezone.utc)
|
||||
if build.end_time:
|
||||
end = datetime.datetime.fromtimestamp(build.end_time)
|
||||
end = datetime.datetime.fromtimestamp(
|
||||
build.end_time,
|
||||
tz=datetime.timezone.utc)
|
||||
|
||||
build_inserts.append({
|
||||
'buildset_id': buildset_ins_result.inserted_primary_key[0],
|
||||
|
||||
Reference in New Issue
Block a user