Skip to content

datetime DataViews field shows inconsistent values for non-UTC users #72659

@jimjasson

Description

@jimjasson

Description

The datetime DataViews field displays dates and times inconsistently, when the user is not in UTC:

Image

In the above screenshot, the user is in UTC +2. They select 30/10/2025 at midnight, but 29/10/2025 at 22.00 is saved as the value, because the filter value is automatically converted to UTC. The user should see a consistent date and time in the modal and in the saved filter value, so the modal's date/time selectors should also be in UTC.

Step-by-step reproduction instructions

  1. Go to the Storybook.
  2. Navigate to DataViews > FieldTypes > datetime.
  3. Ensure that you are not in UTC.
  4. Click to add a filter for the datetime field.
  5. Select a date and time.
  6. Notice that the saved filter value is different to the one you selected.

Screenshots, screen recording, code snippet

No response

Environment info

No installation -- can be replicated on Storybook.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions