Thread Umrechnung von Unix Time mit Perl (22 answers)
Opened by Rambo at 2007-06-28 12:35

Rambo
 2007-07-02 13:51
#77962 #77962
User since
2003-08-14
803 Artikel
BenutzerIn

user image
Das kannte ich nicht. Vielen Dank für die Infos.

Meine Ansatz war folgender
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
while(my @row = $sth->fetchrow_array()) { 
my $took = $row[5];
my $ws = $row[3];
my $info = substr $row[6],0,5;
my $time = substr $row[9],0,10;

my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time);
$mon += 1;
$year += 1900;
my $time_stamp = sprintf "%s.%s.%s %s:%s:%s", $mday, $mon, $year, $hour, $min, $sec;

my @data = "$time_stamp $took ms for $info on $ws\n";
open(IN, ">>$local_time.txt") or die $!;
print IN @data;
close IN;
print "$time_stamp $took ms for $info on $ws\n";
}


Danke noch mal

gr. rambo

View full thread Umrechnung von Unix Time mit Perl