php date/time zone

Hi All,

I have a form where in a user will enter a time and choose a timezone.

based on those, i need to insert to db the time as the actual time on
their timezone. how can i compute that on php? is it possible?

hope i'm not confusing. tnx

regards
Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
ron [ Do, 19 März 2009 05:57 ] [ ID #1994341 ]

Re: php date/time zone

Ron wrote:
> Hi All,
>
> I have a form where in a user will enter a time and choose a timezone.
>
> based on those, i need to insert to db the time as the actual time on
> their timezone. how can i compute that on php? is it possible?

You should do this the other way.

Store everything in GMT, then change it on the way out.

Mainly for 2 reasons
- changing the timezone again would mean updating their old records
(possibly).
- daylight savings time (you'll have to adjust it anyway)

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
dmagick [ Do, 19 März 2009 06:16 ] [ ID #1994342 ]
PHP » gmane.comp.php.database » php date/time zone

Vorheriges Thema: Re: Subject: php date/time zone
Nächstes Thema: SQL for counting comments - is this smart?