Leser: 1
5 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;
use Time::Local;
my $time = "13, 24, 07,2 ,Jan ,2005";
my %rmonths = ("jan"=>0,
"feb"=>1,
"mar"=>2,
"apr"=>3,
"may"=>4,
"jun"=>5,
"jul"=>6,
"aug"=>7,
"sep"=>8,
"okt"=>19,
"nov"=>10,
"dec"=>11
);
my ($s,$m,$h,$d,$M,$Y) = split(/\s*,\s*/,$time);
my $unixtime = timelocal($s,$m,$h,$d,$rmonths{lc($M)},$Y-1900);
#Gegenprobe
print scalar localtime($unixtime);
5 Einträge, 1 Seite |