Index: trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
===================================================================
--- trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11074)
+++ trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp	(revision 11083)
@@ -1275,5 +1275,5 @@
     if (bdt) {
       epoSecBds += 14.0;
-      if (epoSecBds > 604800.0) {
+      if (epoSecBds >= 604800.0) {
         epoSecBds -= 7.0*24.0*60.0*60.0;
       }
@@ -1289,11 +1289,17 @@
   }
 
+  // The epoch is given as seconds of week (or of day): move it by whole days
+  // to the one closest to the current time. Folding in 12 h steps (as
+  // before) stopped at the edge of the +-12 h window, e.g. at the week
+  // change a correction of Saturday 23:59:55 received after midnight ended
+  // up at Sunday 11:59:55.
   if (_lastTime.valid()) {
-    double maxDiff = 12 * 3600.0;
-    while (_lastTime < currentTime - maxDiff) {
-      _lastTime = _lastTime + maxDiff;
-    }
-    while (_lastTime > currentTime + maxDiff) {
-      _lastTime = _lastTime - maxDiff;
+    const double halfDay = 12 * 3600.0;
+    const double day     = 24 * 3600.0;
+    while (_lastTime < currentTime - halfDay) {
+      _lastTime = _lastTime + day;
+    }
+    while (_lastTime > currentTime + halfDay) {
+      _lastTime = _lastTime - day;
     }
   }
