Re: Adding Timezone Support to a production app

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, Feb 23, 2015 at 6:15 am, Piers <piers@xxxxxxxxxxx>, 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/

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux