php3-list | 199903
Date: 03/18/99
- Next message: Zak Greant: "[PHP3] Multi-Dimensional Array / Having your cake and eating it too"
- Previous message: mateo: "Re: [PHP3] php crash!"
- In reply to: Kip Keil: "Re: [PHP3] Cookies lifetime"
- Next in thread: Jean-Marc Libs: "Re: [PHP3] Cookies lifetime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This skew up gets even worse if you live in a "Daylight savings time" area,
like me. Many asian countries don't use Daylight savings time, so me,
logging into a Hong Kong server from US, the time difference varies.
-----Original Message-----
From: Kip Keil [mailto:kip <email protected>]
Sent: Thursday, March 18, 1999 3:45 PM
To: Denis Thuillier
Cc: PHP3
Subject: Re: [PHP3] Cookies lifetime
Are you certain? I mean, looking at this purely from a logical perspective,
this
doesn't make any sense.
My server is in MST (GMT-5) and a client logs in from EST (GMT-3) with a
cookie set
for 1hr using time()+3600. According to your theory, the cookie will have
expired
an hours before it was set. Nevertheless, my client gets in and works for
an hour
before the cookie expires.
Just imagine some in Hawaii (GMT-8) trying to log in and use a service on a
server
in Japan (GMT+9). Unless the cookie lifetime is set for 18hr, the Hawaii
user will
never get on. Yet I've never heard of this type of thing happening.
Then, there're the people who buy a computer, take it home, set it up, and
never
bother with the clock settings the first time. Or who pack up and move
across
country....in which case, they don't get nagged to check the time setting.
And what about the change from xST to xDT and vice versa? While note used
in a lot
of places (even some areas of the US have wised up and dropped this
now-archaic
practice), but this would certainly complicate matters.
No, I think the basic practice is that HTTP servers and clients _both_ look
to
GMT. As you've explained it, the HTTP server uses GMT, but the HTTP client
uses
local time. In fact, neither one actually uses GMT (meaning, by direct
reference
to GMT via NIST, et al), but each uses local time to derive GMT. If the
local
clock is off, neither the server nor the browser knows about it.
So, if my server is running at GMT-4:50 (as opposed to GMT-5), and your
computer is
running at GMT+2:10 (as opposed to GMT+2), then your cookie is already 20min
old
when it gets set. And nobody knows. All my server knows is to pass a
variable
that represents an arbitrary mark in time. All your client knows is it
received a
variable that represents an arbitrary mark in time. Neither your client,
nor my
server, knows, nor cares, that the relative period until reaching that
arbitrary
mark in time is different from what the programmer intended.
Now I could be wrong, cuz I haven't gone digging into the specs on this
stuff. I'm
just spewing forth hyperbole based on observation. As I recall, we do have
few
people on this list who have taken the time to get far more intimate with
specs
than have I. Maybe one of these esteemed individuals can shed more light on
this.
Kip
Denis Thuillier wrote:
> I finally find the solution.
>
> The problem comes from time zone, IE4 and Netscape3 calculate cookie
> lifetime with GMT time. The server and the remote machine have to be in
the
> same time zone.
>
> Example:
> If the server is set to be in GMT (Greenwich) and the remote machine is
set
> to be GMT (Paris, Madrid) (+1h)
> the cookie lifetime will be 1h(cookie time) - 1h(Greenwitch-Paris) = 0.
>
> (In fact I have set my cookie time()+3700 then 3700-3600=100s=1mn20)
>
> -----Message d'origine-----
> De : "Denis Thuillier" <dthuillier <email protected>>
> Groupes de discussion : php3.general
> Date : vendredi 12 mars 1999 15:28
> Objet : [PHP3] Cookies lifetime
>
> Hello to everyone.
>
> We are using php3 on a NT server with IIS3.
> We have noticed that cookies don’t run the same time depending on the
> navigator and on the computers.
> The navigators are IE4 and Netscape 3. On some computers, a cookie which
is
> supposed to run for one hour runs in fact for about 1 min 20.
> The problem doesn’t seem to come from the navigator configuration as the
> same configuration on two different computers gives different cookies
> lifetime.
> If Netscape 4 is used, there is no problem, whatever the machines.
> If anyone has any suggestions, thanks to let me know.
> Thank you.
>
> Denis Thuillier
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive:
> http://www.php.net/mailsearch.php3
> List administrator: zeev-list-admin <email protected>
>
> ---
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive:
http://www.php.net/mailsearch.php3
> List administrator: zeev-list-admin <email protected>
-- Kip Keil, Sr. Programmer, V i s i o n N e t http://www.vsnet.com | http://kip.vsnet.com MC, Ad Hoc P-3055; MC, Advancement T-1022; MC, Ad Hoc T-175 AA, Ceremonies El-Ku-Ta 520, Great Salt Lake Council, BSA --We all learn from history . . . ....either by study, or by repetition. -- Kip Keil, 1998-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Zak Greant: "[PHP3] Multi-Dimensional Array / Having your cake and eating it too"
- Previous message: mateo: "Re: [PHP3] php crash!"
- In reply to: Kip Keil: "Re: [PHP3] Cookies lifetime"
- Next in thread: Jean-Marc Libs: "Re: [PHP3] Cookies lifetime"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

