Skip to content

DateTimePicker Displays an Incorrect Calendar if the user's timezone is vastly different from the WordPress one. #47698

@cadwell

Description

@cadwell

Description

When the user's timezone is significantly different than the timezone that WordPress is configured with, the DateTimePicker component displays incorrectly. The first day of the month that is being displayed is the last day of the previous month. This causes some days within the month to disappear.

Similar issue to #29306 however this targets the month's display.

Step-by-step reproduction instructions

  1. Change your local machine's timezone to somewhere in England.
  2. Set WordPress's timezone setting to Los Angeles.
  3. Edit or Add a new post.
  4. Open the DateTimePicker component by trying to schedule a post.

Screenshots, screen recording, code snippet

image

Environment info

  • WordPress Version 6.1.1

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Package] Date/packages/date[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions