Re: Timezones

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

 



Hi Trevor,

I have list of Timezones (see the attachment) but I do not know the offset in respect of GMT. Then I will be able to calculate my local time for every user local input.

I would like to know which PHP date/time functions operate with the system time alone and which one take the timezone into consideration. When in the function description is mentioned "local time" what does this mean? User local or system local?

Kindest regards,
Venelin

Gryffyn, Trevor wrote:

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@xxxxxxxxxxx] 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@xxxxxxxxx] Sent: Friday, November 19, 2004 6:57 AM
To: php-general@xxxxxxxxxxxxx
Subject: 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








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

[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