Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Make HTTP date usable

by ikegami (Patriarch)
on Sep 17, 2009 at 14:30 UTC ( [id://795896]=note: print w/replies, xml ) Need Help??


in reply to Make HTTP date usable

Not it doesn't. ->last_modified returns epoch time (as returned by time).
>perl -MLWP -E"say LWP::UserAgent->new->get('http://www.perlmonks.org' +)->last_modified" 1253197990

You can format the result by using localtime or gmtime with POSIX's strftime. Alternatively, every date module out there accepts epoch time as an input.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://795896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-23 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found