Bruno B B Magalhães wrote:
> Hi you all,
>
> How do you work with GMT time-zones? I mean, I´ve developed a support
> system, with projects, bugs, tasks, etc... but as I user date()ç,I is 6
> hours late from my client´s time-zone...
>
> And I would like to make it a little more dynamic than just put a
> variable in the code and add to the hour.

Store all your stuff as GMT or UTC -- or even in your own local time.

But allow your users to set a "preference" for their own time zone.  You
should be able to find a simple "preferences" system out there in
http://phpclasses.org or on http://zend.com or even http://google.com

Anyway, after that, you just convert with their preference from your
stored time.

You just have to be REALLY careful that you are consistent when you show
them a time, and when you GET a time from them, and *always* remember to
convert back-and-forth before you store it.

Your database may also support time-zone input in some manner, and can
maybe be helpful in this task.  That's gonna be database-dependent, almost
for sure.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to