]>
git.proxmox.com Git - pve-installer.git/blob - checktime
7 use POSIX
qw(strftime);
10 my $st = stat("/usr/bin/checktime") || stat("./checktime");
14 if ($ctime < $st->atime) {
15 my $system_time_str = strftime
"%F %T", localtime $ctime;
16 my $pkg_time_str = strftime
"%F %T", localtime $st->atime;
17 warn "detected wrong system time $system_time_str, older than installer ($pkg_time_str)\n";
18 my $tstr = localtime $st->atime;
19 # correct system time to avoid errors, i.e gpg fails
20 system ("date -s '$tstr'");