From 85b0b7bf5d8b7cf0f393a634146a152c89fdea56 Mon Sep 17 00:00:00 2001 From: Daniel Nitsikopoulos Date: Sat, 25 Feb 2023 14:18:28 +1100 Subject: [PATCH] Set checkin published_at to UTC time --- lib/adamantium/micropub_request_parser.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/adamantium/micropub_request_parser.rb b/lib/adamantium/micropub_request_parser.rb index 8efcba0..b5e0f72 100644 --- a/lib/adamantium/micropub_request_parser.rb +++ b/lib/adamantium/micropub_request_parser.rb @@ -99,7 +99,8 @@ module Adamantium new_params[:url] = checkin.dig(:properties, :url)&.first new_params[:slug] = SecureRandom.uuid new_params[:category] = params.dig(:properties, :category) - new_params[:published_at] = params.dig(:properties, :published)&.first + published = DateTime.parse(params.dig(:properties, :published)&.first).new_offset(0) + new_params[:published_at] = published new_params[:post_type] = :checkin location = params.dig(:properties, :location).first[:properties] new_params[:photos] = []