Hi guys, date fields in the CMS are emitting as UTC dates in HTML Embed elements. It breaks our sites since I happen to be managing projects in New Zealand at the moment - GMT+12.
Here’s a demonstration-
It looks like a similar problem was fixed earlier this year with regards to the primary HTML output, and that’s been fixed to localize the date based on the site’s specific timezone settings. However somehow that was missed in HTML embeds.
A fix around dates import have been pushed this week. Previously import of dates was a bit hard as you had to add 3 to your usual offset. For example I had to import YYYY-MM-DDTHH:MM+04:00 to add a GMT+1(UTF+1) time.
But this is fixed since thursday. And I learnt that WF only stores the dates in UTC. So anything you type in or import is converted to UTC depending on your site’s timezone settings. Then WF uses the timezeone to display the correct time within CMS backend, designer and on publish.
So that’s the reason UTC time shows up, I guess. It’s probably a bug where the timezone isn’t applied to what Webflow stores.
@vincent Can you tell me roughly when the HTML Embed can be fixed to emit the correct local datetime? That’s the last piece I need for Google’s Rich Cards. Thanks for looking at this.
Oh sorry no I can’t. I’m not working for Webflow, I know nothing about the roadmap and I’m not part of any beta test atm. I have pinged @Brando so I’m sure they’re aware of this at least.
This definitely looks related to the update we pushed that Vincent mentioned. I have reported these findings to the team and we will investigate further.
I’ll post back as soon as I have more information for you!
I just spoke with our team on this and we found the root cause of the issue. We are still working out a solution for it, and hope to have it soon. I’ve also notified the team that this is blocking you and your client.
We looked into workarounds to see if we could provide a temporary patch while the team finds a permanent solution, but unfortunately we weren’t able to find any practical ones.
I’ll notify you as soon as I have another update on this!