X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/d6fadc26427c313080d7693c4a28ed8f0ec559c4..1d6ece3b691d591e2d8fd1f044e268fdb67edef0:/update-iserv1-iserv2.pl diff --git a/update-iserv1-iserv2.pl b/update-iserv1-iserv2.pl index 500ac56..c0f219a 100755 --- a/update-iserv1-iserv2.pl +++ b/update-iserv1-iserv2.pl @@ -48,7 +48,7 @@ while() { my $hr = $2; $hr = "0$hr" if length $hr < 2; push @tsbeginold, "$hr:$3:00"; - push @tsbegin, Time::Local::timelocal 0, $3, $hr, 1, 0, 1970; + push @tsbegin, Time::Local::timegm 0, $3, $hr, 1, 0, 1970; print " found beginning: $hr:$3\n"; } } @@ -64,7 +64,7 @@ while() { my $hr = $2; $hr = "0$hr" if length $hr < 2; push @tsendold, "$hr:$3:00"; - push @tsend, Time::Local::timelocal 0, $3, $hr, 1, 0, 1970; + push @tsend, Time::Local::timegm 0, $3, $hr, 1, 0, 1970; print " found ending: $hr:$3\n"; } } @@ -176,7 +176,7 @@ system "touch $NEWCFG"; open OUT, ">", $NEWCFG or die "ERROR: new config file could not be opened: $!"; print OUT "flushTimeslices();\n"; for(my $i = 0; $i <= $#tsbegin; $i++) { - print OUT "\$this->addTimeslice(new rsTimeslice($tsbegin[$i],$tsend[$i]));\n"; + print OUT "\$this->addTimeslice(new mod_roomReservationTimeslice($tsbegin[$i],$tsend[$i]));\n"; } print OUT "\$this->setShowWeekend($showweekend);\n"; print OUT "\$this->setShowLessons($showlessons);\n"; @@ -222,8 +222,9 @@ foreach(IServ::DB::GetArr("SELECT * FROM mod_roomreservation_bookings_old;")) { $row{"reason"}, "rrb_interval" => $row{"fixed"} }; } -# delete old table +# delete old tables IServ::DB::Exec "DROP TABLE mod_roomreservation_bookings_old;"; +IServ::DB::Exec "DROP TABLE rooms_archive;"; print "done.\n";