Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   How do I convert TIME into Cookie and last-modified-time format? (http://www.velocityreviews.com/forums/t888286-how-do-i-convert-time-into-cookie-and-last-modified-time-format.html)

10-01-2004 06:05 PM

How do I convert TIME into Cookie and last-modified-time format?
 
First of all, I want to know if Cookie's expiration time and HTTP's header's
last modified time are using the same format.

Secondly, how do I format the time from a 10923023324324 kind of number into
the cookie and http header format(s)?



Rhesa Rozendaal 10-01-2004 06:34 PM

Re: How do I convert TIME into Cookie and last-modified-time format?
 
123@abc.xyz wrote:
> First of all, I want to know if Cookie's expiration time and HTTP's header's
> last modified time are using the same format.


Yes, they are. It's RFC 1123 format.

> Secondly, how do I format the time from a 10923023324324 kind of number into
> the cookie and http header format(s)?


use HTTP::Date;
print time2str( 1092302332 );
# prints Thu, 12 Aug 2004 09:18:52 GMT

J. Gleixner 10-01-2004 07:28 PM

Re: How do I convert TIME into Cookie and last-modified-time format?
 
123@abc.xyz wrote:
> First of all, I want to know if Cookie's expiration time and HTTP's header's
> last modified time are using the same format.
>
> Secondly, how do I format the time from a 10923023324324 kind of number into
> the cookie and http header format(s)?


Perl has cookies??.. Cool, I'm hungry.


All times are GMT. The time now is 01:42 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.