File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
packages/endpoint-posts/lib/controllers Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -2,11 +2,7 @@ import path from "node:path";
22
33import { jf2ToMf2 } from "@indiekit/endpoint-micropub/lib/mf2.js" ;
44import { checkScope } from "@indiekit/endpoint-micropub/lib/scope.js" ;
5- import {
6- getTimeZoneDesignator ,
7- getTimeZoneOffset ,
8- sanitise ,
9- } from "@indiekit/util" ;
5+ import { formatLocalToZonedDate , sanitise } from "@indiekit/util" ;
106import { validationResult } from "express-validator" ;
117
128import { endpoint } from "../endpoint.js" ;
@@ -67,12 +63,7 @@ export const formController = {
6763 delete values . published ;
6864 } else {
6965 // Add timezone designator to local date value
70- const timeZoneOffsetMinutes = getTimeZoneOffset (
71- timeZone ,
72- values . published ,
73- ) ;
74- const timeZoneDesignator = getTimeZoneDesignator ( timeZoneOffsetMinutes ) ;
75- values . published = values . published + timeZoneDesignator ;
66+ values . published = formatLocalToZonedDate ( values . published , timeZone ) ;
7667 }
7768
7869 // Convert media values object to Array
You can’t perform that action at this time.
0 commit comments