Adding Timezone Support to a production app
| From: | Piers | Date: | Mon, 23 Feb 2015 06:15:09 +0000 |
| Subject: | Adding Timezone Support to a production app | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-324501@lists.php.net to get a copy of this message | ||
Hi there,
I have an app with users in one timezone with the date / time stored in their location. Now there are more users in more locations and I would like to support them - ideally without changing to historical data.
At the moment the app uses a time offset field to allow two people to see one note expressed in their timezone.
There are two use cases for this one is the free/busy calendar, the other is the meeting invite ICS file.
At the moment I would like to support ICS which are GMT based.
My guess is that:
* Assign each user to their own timezone
* I take the diary row ($start_date, $start_time) and convert it to a GMT timestamp
* Make the ICS file
I am keen to hear of better solutions or ideas.
Cheers
P