{"action":"created","issue":{"url":"https://api.github.com/repos/contao/core/issues/8101","labels_url":"https://api.github.com/repos/contao/core/issues/8101/labels{/name}","comments_url":"https://api.github.com/repos/contao/core/issues/8101/comments","events_url":"https://api.github.com/repos/contao/core/issues/8101/events","html_url":"https://github.com/contao/core/issues/8101","id":116045700,"number":8101,"title":"bug with editing events after timezone change","user":{"login":"fritzmg","id":4970961,"avatar_url":"https://avatars.githubusercontent.com/u/4970961?v=3","gravatar_id":"","url":"https://api.github.com/users/fritzmg","html_url":"https://github.com/fritzmg","followers_url":"https://api.github.com/users/fritzmg/followers","following_url":"https://api.github.com/users/fritzmg/following{/other_user}","gists_url":"https://api.github.com/users/fritzmg/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzmg/subscriptions","organizations_url":"https://api.github.com/users/fritzmg/orgs","repos_url":"https://api.github.com/users/fritzmg/repos","events_url":"https://api.github.com/users/fritzmg/events{/privacy}","received_events_url":"https://api.github.com/users/fritzmg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-10T06:57:21Z","updated_at":"2015-11-10T07:20:09Z","closed_at":null,"body":"### Short description\r\n\r\nIf you change the timezone from e.g. Europe/Vienna (UTC+1) to Europe/London (UTC) and then edit an event, the event date will be one __day__ (and one hour, which is correct) in the past of the original date.\r\n\r\n### Reproduction\r\n\r\n* set the timezone to _Europe/Vienna_\r\n* create a new event, set the start date to `2015-11-12` and the start time (and end time) to `08:00`, save and close\r\n* go to the system settings and set the timezone to _Europe/London_\r\n* go to the calendar - the overview will display the event's date correctly as `[2015-11-12 07:00]`\r\n* edit the event - now the start date will be 2015-11-__11__ for some reason (start time will be 07:00 which is correct)\r\n\r\nThis does not happen in the other direction, i.e., if you\r\n\r\n* set the timezone to _Europe/London_\r\n* create a new event with the start date 2015-11-12 and start/end time 08:00\r\n* set the timezone to _Europe/Vienna_\r\n* edit the event again\r\n\r\nthe start date will still be 2015-11-12 and the start/end time will be 09:00."},"comment":{"url":"https://api.github.com/repos/contao/core/issues/comments/155340966","html_url":"https://github.com/contao/core/issues/8101#issuecomment-155340966","issue_url":"https://api.github.com/repos/contao/core/issues/8101","id":155340966,"user":{"login":"fritzmg","id":4970961,"avatar_url":"https://avatars.githubusercontent.com/u/4970961?v=3","gravatar_id":"","url":"https://api.github.com/users/fritzmg","html_url":"https://github.com/fritzmg","followers_url":"https://api.github.com/users/fritzmg/followers","following_url":"https://api.github.com/users/fritzmg/following{/other_user}","gists_url":"https://api.github.com/users/fritzmg/gists{/gist_id}","starred_url":"https://api.github.com/users/fritzmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fritzmg/subscriptions","organizations_url":"https://api.github.com/users/fritzmg/orgs","repos_url":"https://api.github.com/users/fritzmg/repos","events_url":"https://api.github.com/users/fritzmg/events{/privacy}","received_events_url":"https://api.github.com/users/fritzmg/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T07:20:09Z","updated_at":"2015-11-10T07:20:09Z","body":"The cause is, that Contao saves the dates always with the time _00:00:00_. i.e. a start date for 2015-11-12 will be `2015-11-12 00:00:00 UTC+1` (as a UNIX timestamp). This would be `2015-11-11 23:00:00 UTC` of course. It's weird though, that the event list in the backend still shows `2015-11-12` after the change.\r\n\r\nMaybe the start and end _date_ should always be saved as `YYYY-MM-DD 12:00:00`? (and then always re-convert the date to `YYYY-MM-DD 00:00:00` and `YYYY-MM-DD 00:00:00 +1day` when checking for the actual start and end timestamp)."}}