RE: [PHP] Timezones
| From: | Gryffyn, Trevor | Date: | Fri, 19 Nov 2004 17:58:01 +0000 |
| Subject: | RE: [PHP] Timezones | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-202526@lists.php.net to get a copy of this message | ||
Don't know if this helps, but this was a message regarding Windows based
long timezone formats that was posted a little while ago by another
user:
---------------------------------------
Kim [kimrichards76@yahoo.co.uk]
Managed to find it !!!! It helps using just those right keywords after a
million goes....
http://www.steltor.com/notes/corptime-server/5_4/refmanual/refappd.htm
this
is a list of all timezone notations. Thanks for your help. Thought about
the
long way but it was not a pleasant thought as you may imagine, was
hoping to
avoid at all costs. Hopefully this sorts it.
---------------------------------------
You might want to build a table or a list in some way that'll return the
GMT offset for you.
Let us know what you end up doing.
-TG
> -----Original Message-----
> From: Venelin Arnaudov [mailto:venstar@surfeu.de]
> Sent: Friday, November 19, 2004 6:57 AM
> To: php-general@lists.php.net
> Subject: [PHP] Timezones
>
>
> Hi,
>
> I have a legacy PHP3 system and a MySQL DB with two tables:
> user {
> user_id int,
> timezone varchar (like "Europe/Brussels", "US/Eastern",
> "America/New_York", etc.)
> }
> and
> messages {
> msg_id int,
> user_id int,
> date int
> }
>
> When a user submits a message, my PHP script (using time() function)
> stores the submission time in messages.date field. However
> this value is
> not the server's system time but shifted according the users timezone.
>
> 1. How can I convert it to reflect my timezone (ex. GMT)? Is
> there a way
> to find the offset between two timezones given in long format
> as in my
> table?
> 2. I would appreciate any information on how the PHP/Apache
> handles the
> timezone offset when calculating the time. Which of the PHP date/time
> functions take into consideration the environment variable TZ
> (upon user
> login there is putenv('TZ='.user_get_timezone()); command)?
>
> Thank you in advance,
> Venelin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>