Re: 2 different time zones
From: Brian (usenet3_at_julietremblay.com.invalid)
Date: 09/30/04
- Next message: Andy Hassall: "Re: how to use convert_uuencode()"
- Previous message: Ken Robinson: "Re: Serializing Session variables. Cuts off after a given length????"
- Next in thread: Brian: "Re: 2 different time zones"
- Maybe reply: Brian: "Re: 2 different time zones"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/
- Next message: Andy Hassall: "Re: how to use convert_uuencode()"
- Previous message: Ken Robinson: "Re: Serializing Session variables. Cuts off after a given length????"
- Next in thread: Brian: "Re: 2 different time zones"
- Maybe reply: Brian: "Re: 2 different time zones"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|