Closed FinallyCanuck closed 5 months ago
Hey @FinallyCanuck, thanks for reporting the issue. I’ll figure out what’s happening here.
I was sort of confused with the storage format (format
) and display format (date_format
and time_format
) options. But I thought the latter options would affect the storage format as well, because if date_format
or time_format
is false
, saving the date in the complete ISO 8601 format is impossible. I’ll double-check the behaviour of Netlify/Decap CMS later. Handling date/time is so hard 🫠
Sorry for the delay. Just shipped v0.9.9 to fix this particular issue.
I’ll revisit other date/time issues later this week or next week and write automated tests. It’s a good time to do so as Decap CMS 3.1 was out to replace moment.js with day.js as the datetime widget’s formatting library. Sveltia CMS follows the change.
No apologies required. Thank you for looking into this so quickly.
In posts using Decap, datetiime was returned as, for example:
date: 2023-04-09T22:38:00.000Z
In a new post I've made using Sveltia, it produces:
date: 2024-01-29T23:10
This creates an Invalid DateTime display in on my rendered page.
For reference, here is a snippet of my config (that hasn't been changed since move to Sveltia.
When I refer to the Decap docs, the datetime formatting appears to reflect how it should appear in the CMS UI, not the output.
Any thoughts on how to return to the previous format?