From 1e0301a293d9c198c68108d318520b9e6bc6d55c Mon Sep 17 00:00:00 2001 From: Richard Towers Date: Wed, 3 Jul 2024 15:40:05 +0100 Subject: [PATCH] WIP fix timezone in tests --- spec/models/dimensions/edition_spec.rb | 4 ++-- spec/requests/api/single_page_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/models/dimensions/edition_spec.rb b/spec/models/dimensions/edition_spec.rb index f3f015efc..079cc39ca 100644 --- a/spec/models/dimensions/edition_spec.rb +++ b/spec/models/dimensions/edition_spec.rb @@ -161,8 +161,8 @@ content_id: "the-content-id", locale: "en", title: "The Title", - first_published_at: Time.utc(2018, 1, 1).strftime("%Y-%m-%d"), - public_updated_at: Time.utc(2018, 5, 20).strftime("%Y-%m-%d"), + first_published_at: Time.zone.parse("2018-01-01"), + public_updated_at: Time.zone.parse("2018-05-20"), publishing_app: "publisher", document_type: "guide", primary_organisation_title: "The ministry", diff --git a/spec/requests/api/single_page_spec.rb b/spec/requests/api/single_page_spec.rb index 457167b07..554b7eef7 100644 --- a/spec/requests/api/single_page_spec.rb +++ b/spec/requests/api/single_page_spec.rb @@ -57,8 +57,8 @@ "locale" => "en", "document_type" => "guide", "publishing_app" => "whitehall", - "first_published_at" => "2018-07-17T10:35:59.000Z", - "public_updated_at" => "2018-07-17T10:35:57.000Z", + "first_published_at" => "2018-07-17T11:35:59.000+01:00", + "public_updated_at" => "2018-07-17T11:35:57.000+01:00", "primary_organisation_title" => "The ministry", "withdrawn" => false, "historical" => false,