Index: trunk/ippScripts/scripts/diff_skycell.pl
===================================================================
--- trunk/ippScripts/scripts/diff_skycell.pl	(revision 19932)
+++ 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;
