in t/modules/expires.t [259:283]
sub convert_to_time {
my $timestr = shift;
return undef unless $timestr;
my ($sec,$min,$hours,$mday,$mon,$year);
if ($timestr =~ /^\w{3}, (\d+) (\w{3}) (\d{4}) (\d{2}):(\d{2}):(\d{2}).*$/) {
$mday = $1;
$mon = $month{$2};
$year = $3;
$hours = $4;
$min = $5;
$sec = $6;
}
return undef
unless
defined $sec &&
defined $min &&
defined $hours &&
defined $mday &&
defined $mon &&
defined $year;
return Time::Local::timegm($sec, $min, $hours, $mday, $mon, $year);
}