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

Different timezones on server/local env changes the inserted date

    Details

      Description

      Steps to reproduce
      • Set your server timezone to Etc/UTC, for instance (that's what I have in my /etc/timezone)
      • Set your local timezone to some timezone that is your localtime - x, where the result will end on the previous day (example: I did this test at 08:00am and set the timezone to Alaska i.e., my timezone minus 9:00 => 11:00PM of the previous day)
      • Created a content type with a date fieldtype
      • Created an object of the previous content type and set the date to "1938-01-01"
      • Exit the date field. When I exit the date field, some validation is done and the date is updated to "1936-07-29". Every time I do that, the date changes to something different than the original value
      Steps to reproduce (Yannick)
      • Set your timezone in php.ini to America/Martinique
      • Create a date in the platform UI, publish
      • Display this date
      • It is a day earlier than the entered date.

        Issue Links

          Activity

          Show
          Yannick Roger (Inactive) added a comment - Fixed in 1.7, 1.8, master: https://github.com/ezsystems/ezpublish-kernel/commit/a02c81f51b3aa0a29aff034d5d71eb4f400607be
          Hide
          Gaetano Giunta added a comment -

          Fix seems to be buggy
          See comment on the PR on github.

          Show
          Gaetano Giunta added a comment - Fix seems to be buggy See comment on the PR on github.
          Hide
          Yannick Roger (Inactive) added a comment -

          I saw the comment.
          Indeed it seems there might be a BC. Issue. I'll fix it today.

          Show
          Yannick Roger (Inactive) added a comment - I saw the comment. Indeed it seems there might be a BC. Issue. I'll fix it today.
          Hide
          Gaetano Giunta added a comment -

          Show
          Gaetano Giunta added a comment -
          Hide
          Yannick Roger (Inactive) added a comment -

          Created EZP-27281 to work on it.

          Show
          Yannick Roger (Inactive) added a comment - Created EZP-27281 to work on it.

            People

            • Assignee:
              Unassigned
              Reporter:
              Paulo Nunes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 15 minutes
                4h 15m