Ticket #272 (closed enhancement: fixed)
Using GMT time for database times and timezones (fase 1)
|Reported by:||robert||Owned by:||robert|
|MoSCoW:||Must Have||Estimated time after impact analysis:|
|Related to project:||none||Tested:||no|
We currently insert database dates for created and changed using the server time, which is [CET] (central european time). The problem with [CET] is the difference during summer and winter time. Current (summer) is GMT+0200 and during winter GMT+0100.
Also dates supplied by REST calls are stored as 'is'. Output of dates in REST calls are returned as they are stored. There is no indication on the output in which timezone we return our dates.
This is starting to be a problem because our new admin tools show dates converted from GMT to the timezone of the website. So all times are shown with +0200. We hot-fixed it by setting the timezone in the admin to +0000.
Another problem is that different EGA's can be in different timezones, inserting dates in their timezone. This is not a big problem because the dates are returned as they where supplied. However, if 2 EGA's would share assets/mediafiles and have both different timezones, both EGA's will not receive the correct dates.
To fix this;
We need to store all automated dates like created and changed as GMT.
We need to store all incoming dates from EGA's as GMT, so output dates can be converted into the timezone of the EGA.
Each EGA requires own timezone setting; this timezone is used to convert incoming dates into GMT and outgoing date into the timezone of the EGA.
Extra setting EGA.
All output dates needs conversion for dates, like meta-data, created, changed dates.
All input dates needs conversion to GMT.
Needs more study how to convert times from own timezone to GMT and back (code available for converion from GMT to timezone in Drupal 7)