Thread Datum in Batch-Datei einfügen (33 answers)
Opened by pomaranc at 2012-02-10 14:38

topeg
 2012-02-11 09:55
#156050 #156050
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
ungetestet:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/perl
use strict;
use warnings;
use Date::Calc 'Date_to_Time';

my $command='VBoxManage.exe modifyvm "NameDerVM" --biossystemtimeoffset %u';
my $date='14.10.2011';

my $time=time();
$time-=Date_to_Time(reverse(split(/\./,$date)),0,0,0);
$time*=1000;

$command=sprintf($command,$time);

exec($command) or die(qq[ERROR exec "$command" ($!)\n]);
die("Something went wrong!\n");

View full thread Datum in Batch-Datei einfügen