Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-31596

'ezdatetime' fieldtype may show invalid datetime due to different timezone settings

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2.5.9
    • Clean installation of eZ Platform v2.5.9

    Description

      Steps to reproduce:

      1. Create ContentType with ezdatetime fieldtype - set default time as the current time.
      2. Set browser timezone to timezone which has a previous or next day after your current day (i.e. by using https://webbrowsertools.com/timezone/extension).
      3. Set PHP timezone to different values.
      4. Create Content within newly created ContentType - observe invalid values in the input field and in flatPickr widget during draft creation.
      5. Publish Content.
      6. Edit this Content - observe different values in input field than values you have set in the previous step and weird flatPickr behavior.
      7. Play with timezone settings to observe different scenarios of the steps #4 and #6.

      Result:
      1. The date in the input field has an invalid default datetime when creating new Content.
      2. The date in the input field has an invalid datetime when editing this Content.

      Expected result:
      The datetime in the input field has a valid value in both cases.

      Notes:

      1. In case of showing the default datetime when creating new Content - it should be just the user's current time (the browser's time) - PHP time should not affect this time as the user could be in the different timezone than a server - so showing him "his time" should be a way to go.
      2. This can be really tricky to test, so using different PHP and browser's timezone setups should be taken in consideration.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bartlomiej.wajda@ibexa.co Bartłomiej Wajda
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: