-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date in entry slug is not UTC but local #278
Comments
Will check. |
I don’t think I have made a change to Sveltia CMS recently but can confirm the bug. The fix is coming right away. |
Fixed in v0.49.5 🙇🏼 |
Hey @kyoshino I just tried this in v0.51.1 and the - {
label: "Publish Date",
name: "date",
widget: "datetime",
default: "{{now}}",
format: "YYYY-MM-DDTHH:mm:ssZ",
picker_utc: false,
} And slug is like this: path: "{{year}}/{{slug}}"
slug: "{{date | date('YYYY-MM-DD_HHmm')}}" Does Can open a new issue if thats easier, apologies for posting on an old one. |
Will check! |
In v0.52.0 I’ve added a new option for converting the local date to UTC, so the change won’t break backward compatibility 😉 Pass -slug: "{{date | date('YYYY-MM-DD_HHmm')}}"
+slug: "{{date | date('YYYY-MM-DD_HHmm', 'utc')}}" |
In my setup the posts ase saved using this slug:
slug: "{{year}}-{{month}}-{{day}}-{{hour}}-{{minute}}-{{second}}"
In Decap cms I get files which are using UTC timezone, but it seems that Sveltia is now using local timezone. This now causes for me other issues as the website code expects the times in urls to be specified in UTC.
I don't think I previously had the some problem even with Sveltia, so has something related to this changed in Sveltia?
The text was updated successfully, but these errors were encountered: