Index: /trunk/FACT++/src/datalogger.cc
===================================================================
--- /trunk/FACT++/src/datalogger.cc	(revision 14569)
+++ /trunk/FACT++/src/datalogger.cc	(revision 14570)
@@ -811,5 +811,5 @@
     const Time timeNow;
     const Time nowMinusTwelve = timeNow-boost::posix_time::hours(12);
-    fCurrentDay = nowMinusTwelve.M()*31 + nowMinusTwelve.D();//assume 31 days per month. we do not really care, only want unique number per day of the year
+    fCurrentDay = (int)(timeNow.MjD());//nowMinusTwelve.M()*31 + nowMinusTwelve.D();//assume 31 days per month. we do not really care, only want unique number per day of the year
     lastFlush = Time();
 
@@ -1163,5 +1163,5 @@
     const Time timeNow;
     const Time nowMinusTwelve = timeNow-boost::posix_time::hours(12);
-    int newDayNumber = nowMinusTwelve.M()*31 + nowMinusTwelve.D();//assume 31 days per month. we do not really care, only want unique number per day of the year
+    int newDayNumber = (int)(timeNow.MjD());//nowMinusTwelve.M()*31 + nowMinusTwelve.D();//assume 31 days per month. we do not really care, only want unique number per day of the year
 
     //also check if we should flush the nightly files
