Gordon Burditt wrote:[color=blue][color=green]
> >I'm just lost here.. Is there a function to determine current time on
> >the client's computer clock ?
> >
> >Links / Pointers?[/color]
>
> PHP runs on the server, not on the client.
>[/color]
Well something to extract from http headers / or something from tcp
packets (ouch!!!) ???
>> >I'm just lost here.. Is there a function to determine current time on[color=blue][color=green][color=darkred]
>> >the client's computer clock ?
>> >
>> >Links / Pointers?[/color]
>>
>> PHP runs on the server, not on the client.
>>[/color]
>
>Well something to extract from http headers / or something from tcp
>packets (ouch!!!) ???[/color]
You can't extract information that isn't there. HTTP headers sent
from the client to the server might include timestamps in
"if-modified-since" headers but they aren't CURRENT timestamps and
could easily be months old.
In fact, I need to know what date it is on client side to serve them
content which is date specific..
Mike
Gordon Burditt wrote:[color=blue][color=green][color=darkred]
> >> >I'm just lost here.. Is there a function to determine current time on
> >> >the client's computer clock ?
> >> >
> >> >Links / Pointers?
> >>
> >> PHP runs on the server, not on the client.
> >>[/color]
> >
> >Well something to extract from http headers / or something from tcp
> >packets (ouch!!!) ???[/color]
>
> You can't extract information that isn't there. HTTP headers sent
> from the client to the server might include timestamps in
> "if-modified-since" headers but they aren't CURRENT timestamps and
> could easily be months old.
>
> Javascript is still Turned Off(tm).
>
> Why do you need this information?
>
> Gordon L. Burditt[/color]
*** siliconmike wrote/escribió (6 Jul 2005 22:09:22 -0700):[color=blue]
> In fact, I need to know what date it is on client side to serve them
> content which is date specific..[/color]
So visitors from Asia and Europe can access the contents a few hours before
those from America?
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
siliconmike wrote:[color=blue]
> OH PLEASE TURN JAVASCRIPT ON !![/color]
Why not try comp.lang.javas cript? I think you will get better answers there.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
As long as it can be used to write spyware, it stays off.
As long as it can be used to open two windows when you close one,
it stays off.
[color=blue]
>In fact, I need to know what date it is on client side to serve them
>content which is date specific..[/color]
Are you assuming that the client machine has the clock set anywhere
near correctly? As in within 1 year of the correct date? I don't
think that's a very safe assumption.
>I'm pretty sure you can determine what timezone the person is in based[color=blue]
>on their IP address.[/color]
Given the existence of dialup lines and international telephone
calls, that's going to be difficult to do 100%. Given the existence
of things like AOL (and other ISPs) web proxies, it's even harder
to do this 100%. You might manage to do "close enough", although
it wouldn't surprise me if quite a few people near a timezone
boundary who use dialup lines dial across the boundary.
Then there's the mobile wireless users.
Assuming that this is something the user DOESN'T WANT to spoof,
you could try asking the user what his time zone is, using your
best guess at the time zone as the default.
[color=blue]
>javascript can stay off.[/color]
It's important to bear in mind that there is no absolute time. If a
visitor had been moving at close to the speed of light, then the
difference between the client time and server time could be days,
perhaps even years.
One should not neglect either those who are still partying like it's
1999.
On 6 Jul 2005 14:30:34 -0700, "siliconmik e" <siliconmike@ya hoo.com>
wrote:
[color=blue]
>I'm just lost here.. Is there a function to determine current time on
>the client's computer clock ?[/color]
You can use Javascript on the client to set a cookie with their
current timezone offset and then read that timezone offset in PHP and
adjust all your times appropriately.
I do that exact thing in a number of my sites so all the dates/times
are shown in the users local timezone.
Comment