Commit a18f949c authored by Stan Hu's avatar Stan Hu

Merge branch '227487-convert-serialized-date-times-into-utc' into 'master'

Convert serialized date times into UTC

Closes #227487

See merge request gitlab-org/gitlab!36382
parents 16296f3a ff85ebce
...@@ -12,15 +12,15 @@ module Integrations ...@@ -12,15 +12,15 @@ module Integrations
end end
expose :created_at do |jira_issue| expose :created_at do |jira_issue|
jira_issue.created jira_issue.created.to_datetime.utc
end end
expose :updated_at do |jira_issue| expose :updated_at do |jira_issue|
jira_issue.updated jira_issue.updated.to_datetime.utc
end end
expose :closed_at do |jira_issue| expose :closed_at do |jira_issue|
jira_issue.resolutiondate jira_issue.resolutiondate&.to_datetime&.utc
end end
expose :labels do |jira_issue| expose :labels do |jira_issue|
......
...@@ -25,9 +25,9 @@ RSpec.describe Integrations::Jira::IssueEntity do ...@@ -25,9 +25,9 @@ RSpec.describe Integrations::Jira::IssueEntity do
expect(subject).to include( expect(subject).to include(
project_id: project.id, project_id: project.id,
title: 'summary', title: 'summary',
created_at: '2020-06-25T15:39:30.000+0000', created_at: '2020-06-25T15:39:30.000+0000'.to_datetime.utc,
updated_at: '2020-06-26T15:38:32.000+0000', updated_at: '2020-06-26T15:38:32.000+0000'.to_datetime.utc,
closed_at: '2020-06-27T13:23:51.000+0000', closed_at: '2020-06-27T13:23:51.000+0000'.to_datetime.utc,
labels: [ labels: [
{ {
name: 'backend', name: 'backend',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment