Index: /trunk/FACT++/src/fitsdump.cc
===================================================================
--- /trunk/FACT++/src/fitsdump.cc	(revision 12739)
+++ /trunk/FACT++/src/fitsdump.cc	(revision 12740)
@@ -630,4 +630,6 @@
 
     int row = 0;
+    long UTCvalue0=0;
+    long UTCvalue1=0;
     while (fFile->GetNextRow() && row < numRows)
     {
@@ -664,12 +666,39 @@
                     ;
             }
-            if (!fNoZeroPlease || cValue != 0)
+            if (list.size() == 1 && list[0] == "UnixTimeUTC")
             {
-                statsIt->average += cValue;
-                if (cValue < statsIt->min)
-                    statsIt->min = cValue;
-                if (cValue > statsIt->max)
-                    statsIt->max = cValue;
-                statsIt->numValues++;
+                if (i==0)
+                {
+                    UTCvalue0 = cValue;
+                }
+                else
+                {
+                    UTCvalue1 = cValue;
+                    boost::posix_time::ptime unixTimeT( boost::gregorian::date(1970, boost::gregorian::Jan, 1),
+                            boost::posix_time::seconds(UTCvalue0) +  boost::posix_time::microsec(UTCvalue1));
+
+                    Time mjdTime(unixTimeT);
+                    cValue = mjdTime.Mjd();
+                    if (!fNoZeroPlease || cValue != 0)
+                    {
+                        statsIt->average += cValue;
+                        if (cValue < statsIt->min)
+                            statsIt->min = cValue;
+                        if (cValue > statsIt->max)
+                            statsIt->max = cValue;
+                        statsIt->numValues++;
+                    }
+                }
+            }
+            else {
+                if (!fNoZeroPlease || cValue != 0)
+                {
+                    statsIt->average += cValue;
+                    if (cValue < statsIt->min)
+                        statsIt->min = cValue;
+                    if (cValue > statsIt->max)
+                        statsIt->max = cValue;
+                    statsIt->numValues++;
+                }
             }
             }
