Re: Adding Timezone Support to a production app

From: Date: Mon, 23 Feb 2015 08:14:23 +0000
Subject: Re: Adding Timezone Support to a production app
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-324508@lists.php.net to get a copy of this message
On Monday, Feb 23, 2015 at 6:15 am, Piers <piers@rowan.id.au>, wrote: 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. Personally I store all date/times as unix timestamps and apply a timezone on display based on a user’s preferences. I’ve had people argue that you should retain the timezone with which you were given a date/time, but I’ve never found an actual use for it after the fact.. -Stuart --  Stuart Dallas 3ft9 Ltd http://3ft9.com/

« previous php.general (#324508) next »