Merge pull request #6698 from wenottingham/the-time-zone-is-for-loading-and-saving-only

Cast the start/end times with timezone.

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2020-04-14 17:53:35 +00:00
committed by GitHub

View File

@@ -248,9 +248,9 @@ def copy_tables(since, full_path):
main_jobevent.role,
main_jobevent.job_id,
main_jobevent.host_id,
main_jobevent.host_name,
CAST(main_jobevent.event_data::json->>'start' AS TIMESTAMP) AS start,
CAST(main_jobevent.event_data::json->>'end' AS TIMESTAMP) AS end,
main_jobevent.host_name
, CAST(main_jobevent.event_data::json->>'start' AS TIMESTAMP WITH TIME ZONE) AS start,
CAST(main_jobevent.event_data::json->>'end' AS TIMESTAMP WITH TIME ZONE) AS end,
main_jobevent.event_data::json->'duration' AS duration,
main_jobevent.event_data::json->'res'->'warnings' AS warnings,
main_jobevent.event_data::json->'res'->'deprecations' AS deprecations