Satyam wrote:
Of cause the major fault with this is that it can only display the
CURRENT time offset. You *ALSO* need the users Daylight Saving Zone as
well. This has been giving us great fun since the winter dates and
times need a different offset to the summer ones. Something that
simplistic browser time offset does not supply. :(
The point is that you don't store the time offset in any user profile or
anywhere but a session variable, which you keep for the duration of the
session so it lasts only while the user is connected, whether logged in
or not, profile or not. Next time he/she connects you get the new
offset. If the time has changed due to daylight savings or the user
travelling elsewhere, you'll get a new offset.
The only time it fails is if the user is connected while the time switch
is happening, but so will most of the clocks, watches and whatever is on
at the time.
Please read what I wrote.
The time offset from the browser is only of use to map CURRENT time. It is no
use to display dates and times stored in the database that are reliant on the
daylight saving offset. If TOMORROW is after the change in daylight saving,
then the browser offset will not give you the right offset for tomorrows. The
problem is convincing people that there *IS* a real problem, and trying to
display the correct times JUST from a timezone offset is wrong for at least
half of the year! You need to know that the time is changing tonight so that
you can display tomorrows calendar correctly?
--
Lester Caine - G8HFL
-----------------------------
Contact - http://home.lsces.co.uk/lsces/wiki/?page=contact
L.S.Caine Electronic Services - http://home.lsces.co.uk
MEDW - http://home.lsces.co.uk/ModelEngineersDigitalWorkshop/
Treasurer - Firebird Foundation Inc. - http://www.firebirdsql.org/index.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php