Skip to content
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

datetime widget shows user's timezone but saves in UTC #7319

Open
Strubbl opened this issue Oct 31, 2024 · 0 comments
Open

datetime widget shows user's timezone but saves in UTC #7319

Strubbl opened this issue Oct 31, 2024 · 0 comments
Labels
area: extensions/widgets/datetime type: bug code to address defects in shipped code

Comments

@Strubbl
Copy link

Strubbl commented Oct 31, 2024

Describe the bug
If i see the datetime widget, it correctly shows my local time. When i set the date to now and save, the date&time is saved for UTC, e.g. 2024-10-31T20:57:00.000Z but should save it as 2024-10-31T20:57:00+02:00.

To Reproduce

  1. create content
  2. use the a datetime widget
  3. hit the "now" button
  4. save

Expected behavior
2024-10-31T20:57:00+02:00 is saved

Applicable Versions:

  • Decap CMS version: 3.3.3
  • Git provider: gitlab
  • OS: Archlinux
  • Browser version Firefox 132

CMS configuration

backend:
  name: gitlab
  repo: asdf/gfhrehrther
  branch: master
  auth_type: pkce
  app_id: asdf
site_url: https://sadfgsdfgsdfgsdfg.as
media_folder: "static/images"
public_folder: "/images"
collections:
  - name: "blog"
    label: "Blog Posts"
    label_singular: "Blog Post"
    folder: "content/post"
    create: true
    slug: "{{slug}}"
    editor:
      preview: false
    fields:
      - { label: "Title", name: "title", widget: "string" }
      - { label: "Draft", name: "draft", widget: "boolean" }
      - { label: "Publish Date", name: "date", widget: "datetime" }
      - { label: "Category", name: "category", widget: "select", multiple: true, min: 1, options: [] }
      - { label: "Tags", name: "tag", widget: "list", min: 1 }
      - { label: "Body", name: "body", widget: "markdown" }
    view_filters:
      - label: Drafts
        field: draft
        pattern: true
    view_groups:
      - label: Category
        field: category
@Strubbl Strubbl added the type: bug code to address defects in shipped code label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: extensions/widgets/datetime type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants