Re: 2 different time zones

From: Brian (usenet3_at_julietremblay.com.invalid)
Date: 09/30/04


Date: Thu, 30 Sep 2004 20:15:30 GMT

Pedro Graca wrote:
> Brian wrote: [snip]
>
>> trying to work out expires times seems rather complicated
>
> Use gmdate() for expiry headers
>
> // expire in half an hour (wherever you are)
> header('Expires: ' . gmdate('r', time()+1800));

That would work if the document didn't have a hard expires time, though
in that case, a cache-control header would be more straight-forward:
header('Cache-Control: max-age=1800');

But the document expires according to the time of day US Pacific time.
The page will show the dinner special. Since the kitchen closes at 10:00
pm each night, the page showing that day's special expires at 10:00pm or
22:00 each day. If someone views the page at 21:59, it is fresh for only
1 minute. If they view it at 06:00 (6am), it is fresh for 14 hours.

I need to get the time of day in Seattle using the server's clock, which
is set to US eastern time. Then I need to create a date formatted for an
http header, based on the current date, but using a hard time. For
example, if I were to view the page at the time I write this article --
Thursday, 30 September 2004 at 12:59pm US PDT -- the page should show
Thursday's dinner special, and the expires header should be

Expires: Thu, 30 Sep 2004 22:00:00 GMT

-- 
Brian  (remove "invalid" to email me)
http://www.tsmchughs.com/


Relevant Pages

  • Re: Cache feature doesnt produce expected result (bug?)
    ... Thx for sticking with this Juan. ... SetAllowResponseInBrowserHistory I get the same result as False is the default. ... responses in the History folder by setting that header. ... When SetAllowResponseInBrowserHistory is set to True, the Expires ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cache feature doesnt produce expected result (bug?)
    ... > Could it be that you saw this when testing without restarting IE? ... > Setting SetAllowResponseInBrowserHistory to true or false... ... >> Expires HTTP header is set to -1 by default. ... >> When SetAllowResponseInBrowserHistory is set to True, the Expires HTTP ...
    (microsoft.public.dotnet.framework.aspnet)
  • Loadrunner and http expires header
    ... We are configuring our Apache web server to send "Expires" header with ... gif images so that browser can cache them for few days. ... can see any improvement in hits/sec or response time with expires ... Does anyone know if the browser simulated by loadrunner honors the ...
    (comp.software.testing)
  • Re: Cache feature doesnt produce expected result (bug?)
    ... I dont see the "This page has expired" message and if I comment out SetAllowResponseInBrowserHistory I get the same result as False is the default. ... set it to true to override the NoCache setting ... responses in the History folder by setting that header. ... When SetAllowResponseInBrowserHistory is set to True, the Expires HTTP ...
    (microsoft.public.dotnet.framework.aspnet)