Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 24 lines (19 sloc) 0.531 kB
4051e74 @bingos Various stuff
authored
1 use strict;
2 use warnings;
3 use DateTime::Format::Strptime;
4
5 #my $date = 'Mon, 14 Dec 2009 13:39:44 GMT';
6 my $pattern = '%a, %d %b %Y %T %Z';
7
8 my $strp = DateTime::Format::Strptime->new(
9 pattern => $pattern,
10 # locale => 'en_GB',
11 # time_zone => 'Europe/London',
12 on_error => 'croak',
13 );
14
15 while (<>) {
16 chomp;
17 if ( my ($date) = $_ =~ /^Last-Updated:\s+(.+)$/i ) {
18 my $dt = $strp->parse_datetime( $date );
19 print $dt->epoch, "\n";
20 last;
21 }
22 }
23
Something went wrong with that request. Please try again.