Index: trunk/BNC/src/upload/bncephuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncephuploadcaster.cpp	(revision 9409)
+++ trunk/BNC/src/upload/bncephuploadcaster.cpp	(revision 9410)
@@ -80,5 +80,5 @@
 
         bncTime toc = eph->TOC();
-        double timeDiff = fabs(toc - currentTime);
+        double dt = currentTime -toc;
 
         const t_ephGPS*  ephGPS  = dynamic_cast<const t_ephGPS*>(eph);
@@ -92,35 +92,35 @@
 
         if      (ephGPS && ephGPS->type() == t_eph::GPS  &&  (system == "ALL" || system == "GPS")) {
-          if (timeDiff <= 4*3600) {
+          if (dt > 14400.0 || dt < -7200.0) {
             size = t_ephEncoder::RTCM3(*ephGPS, Array);
           }
         }
         else if (ephGPS && ephGPS->type() == t_eph::QZSS && (system == "ALL" || system == "QZSS")) {
-          if (timeDiff <= 4*3600) {
+          if (dt >  7200.0 || dt < -3600.0) {
             size = t_ephEncoder::RTCM3(*ephGPS, Array);
           }
         }
         else if (ephGlo && (system == "ALL" || system == "GLONASS")) {
-          if (timeDiff <= 1*3600) {
+          if (dt >  3900.0 || dt < -2100.0) {
             size = t_ephEncoder::RTCM3(*ephGlo, Array);
           }
         }
         else if (ephGal && (system == "ALL" || system == "Galileo")) {
-          if (timeDiff <= 2*3600) {
+          if (dt > 14400.0 || dt <     0.0) {
             size = t_ephEncoder::RTCM3(*ephGal, Array);
           }
         }
         else if (ephSBAS && (system == "ALL" || system == "SBAS")) {
-          if (timeDiff <= 1*3600) {
+          if (dt >   600.0 || dt <  -600.0) {
             size = t_ephEncoder::RTCM3(*ephSBAS, Array);
           }
         }
         else if (ephBDS && (system == "ALL" || system == "BDS")) {
-          if (timeDiff <= 6*3600) {
+          if (dt >  3900.0 || dt <     0.0) {
             size = t_ephEncoder::RTCM3(*ephBDS, Array);
           }
         }
         else if (ephGPS && ephGPS->type() == t_eph::IRNSS && (system == "ALL" || system == "IRNSS")) {
-          if (timeDiff <= 24*3600) {
+          if (fabs(dt > 86400.0)) {
             size = t_ephEncoder::RTCM3(*ephGPS, Array);
           }
