Index: /trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/camera_exp.pl	(revision 19937)
+++ /trunk/ippScripts/scripts/camera_exp.pl	(revision 19938)
@@ -349,5 +349,5 @@
     $fpaCommand .= $camStats->cmdflags();
     $fpaCommand .= " -hostname $host" if defined $host;
-    $fpaCommand .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+    $fpaCommand .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
 } else {
     $fpaCommand .= " -updaterun -state full";
@@ -384,5 +384,5 @@
             $command .= " -path_base $outroot";
             $command .= " -path_base $outroot" if defined $outroot;
-            $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+            $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         } else {
             $command .= " -updateprocessedexp";
Index: /trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- /trunk/ippScripts/scripts/chip_imfile.pl	(revision 19937)
+++ /trunk/ippScripts/scripts/chip_imfile.pl	(revision 19938)
@@ -237,5 +237,5 @@
     $command .= " -dbname $dbname" if defined $dbname;
     $command .= $stats->cmdflags();
-    $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+    $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
 } else {
     $command = "$chiptool -tofullimfile";
@@ -276,5 +276,5 @@
             $command .= " -path_base $outroot";
             $command .= " -hostname $host" if defined $host;
-            $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+            $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         } else {
             $command .= "$chiptool -updateprocessedimfile";
Index: /trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- /trunk/ippScripts/scripts/diff_skycell.pl	(revision 19937)
+++ /trunk/ippScripts/scripts/diff_skycell.pl	(revision 19938)
@@ -244,5 +244,5 @@
         my $command = "$difftool -adddiffskyfile -diff_id $diff_id -uri $outputName -path_base $outroot";
         $command .= $stats->cmdflags();
-        $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         $command .= " -hostname $host" if defined $host;
         $command .= " -dbname $dbname" if defined $dbname;
@@ -267,5 +267,5 @@
     if (defined $diff_id and not $no_update) {
         my $command = "$difftool -adddiffskyfile -diff_id $diff_id -code $exit_code";
-        $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         $command .= " -hostname $host" if defined $host;
         $command .= " -dbname $dbname" if defined $dbname;
Index: /trunk/ippScripts/scripts/fake_imfile.pl
===================================================================
--- /trunk/ippScripts/scripts/fake_imfile.pl	(revision 19937)
+++ /trunk/ippScripts/scripts/fake_imfile.pl	(revision 19938)
@@ -197,5 +197,5 @@
 $command .= " -path_base $outroot";
 $command .= " -dbname $dbname" if defined $dbname;
-$command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+$command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
 # XXX add this after defined
 # $command .= $stats->cmdflags();
@@ -229,5 +229,5 @@
         $command .= " -class_id $class_id";
         $command .= " -path_base $outroot";
-        $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         $command .= " -code $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
Index: /trunk/ippScripts/scripts/stack_skycell.pl
===================================================================
--- /trunk/ippScripts/scripts/stack_skycell.pl	(revision 19937)
+++ /trunk/ippScripts/scripts/stack_skycell.pl	(revision 19938)
@@ -267,5 +267,5 @@
             $command .= " -uri $outputName -path_base $outroot";
             $command .= " -hostname $host" if defined $host;
-            $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+            $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         } else {
             $mode = "-updaterun -state full";
@@ -298,5 +298,5 @@
             $command .= " -addsumskyfile";
             $command .= " -hostname $host" if defined $host;
-            $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+            $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         } else {
             $command .= " -updatesumskyfile";
Index: /trunk/ippScripts/scripts/warp_skycell.pl
===================================================================
--- /trunk/ippScripts/scripts/warp_skycell.pl	(revision 19937)
+++ /trunk/ippScripts/scripts/warp_skycell.pl	(revision 19938)
@@ -255,5 +255,5 @@
             $command .= " -ignore"           if not $accept; # Completed succesfully, but can't produce product
             $command .= " -uri $outputImage" if $accept;
-            $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+            $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
             $command .= $stats->cmdflags()   if $accept;
             $command .= " -hostname $host"   if defined $host;
@@ -309,5 +309,5 @@
         $command .= " -warp_id $warp_id";
         $command .= " -skycell_id $skycell_id";
-        $command .= (" -dtime_script " . (($mjd_start - DateTime->now->mjd) * 86400));
+        $command .= (" -dtime_script " . ((DateTime->now->mjd - $mjd_start) * 86400));
         $command .= " -code $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
