Index: trunk/BNC/src/RTCM3/ephemeris.cpp
===================================================================
--- trunk/BNC/src/RTCM3/ephemeris.cpp	(revision 4900)
+++ trunk/BNC/src/RTCM3/ephemeris.cpp	(revision 4904)
@@ -375,5 +375,5 @@
 // Set Glonass Ephemeris
 ////////////////////////////////////////////////////////////////////////////
-void t_ephGlo::set(const glonassephemeris* ee) {
+void t_ephGlo::set(const glonassephemeris* ee, bool& timeChanged) {
 
   _receptDateTime = currentDateAndTimeGPS();
@@ -387,4 +387,5 @@
   // Check the day once more 
   // -----------------------
+  timeChanged = false;
   {
     const double secPerDay  = 24 * 3600.0;
@@ -398,7 +399,6 @@
     bncTime hTime(ww, (double) tow);
 
-    bool changed = false;
     if      (hTime - currentTime >  secPerDay/2.0) {
-      changed = true;
+      timeChanged = true;
       tow -= int(secPerDay);
       if (tow < 0) {
@@ -408,5 +408,5 @@
     }
     else if (hTime - currentTime < -secPerDay/2.0) {
-      changed = true;
+      timeChanged = true;
       tow += int(secPerDay);
       if (tow > secPerWeek) {
@@ -416,5 +416,5 @@
     }
 
-    if (changed && ((bncApp*) qApp)->mode() == bncApp::batchPostProcessing) {
+    if (timeChanged && ((bncApp*) qApp)->mode() == bncApp::batchPostProcessing) {
       bncTime newHTime(ww, (double) tow);
       cout << "GLONASS " << ee->almanac_number <<  " Time Changed at " 
Index: trunk/BNC/src/RTCM3/ephemeris.h
===================================================================
--- trunk/BNC/src/RTCM3/ephemeris.h	(revision 4900)
+++ trunk/BNC/src/RTCM3/ephemeris.h	(revision 4904)
@@ -141,5 +141,5 @@
   virtual int  RTCM3(unsigned char *);
 
-  void set(const glonassephemeris* ee);
+  void set(const glonassephemeris* ee, bool& timeChanged);
 
   int  slotNum() const {return int(_frequency_number);}
Index: trunk/BNC/src/bncapp.cpp
===================================================================
--- trunk/BNC/src/bncapp.cpp	(revision 4900)
+++ trunk/BNC/src/bncapp.cpp	(revision 4904)
@@ -515,5 +515,6 @@
 
   t_ephGlo eph;
-  eph.set(ep);
+  bool timeChanged;
+  eph.set(ep, timeChanged);
 
   QString strV2 = eph.toString(2.11);
Index: trunk/BNC/src/bncephuser.cpp
===================================================================
--- trunk/BNC/src/bncephuser.cpp	(revision 4900)
+++ trunk/BNC/src/bncephuser.cpp	(revision 4904)
@@ -111,14 +111,27 @@
     bncTime toc(ww, tow);
     if (eLast->TOC() < toc) {
-      delete static_cast<t_ephGlo*>(_eph.value(prn)->prev);
-      _eph.value(prn)->prev = _eph.value(prn)->last;
-      _eph.value(prn)->last = new t_ephGlo();
-      static_cast<t_ephGlo*>(_eph.value(prn)->last)->set(&gloeph);
+      t_ephGlo* ephGlo = new t_ephGlo();
+      bool timeChanged;
+      ephGlo->set(&gloeph, timeChanged);
+      if (timeChanged) {
+        delete ephGlo;
+      }
+      else {
+        delete static_cast<t_ephGlo*>(_eph.value(prn)->prev);
+        _eph.value(prn)->prev = _eph.value(prn)->last;
+        _eph.value(prn)->last = ephGlo;
+      }
     }
   }
   else {
     t_ephGlo* eLast = new t_ephGlo();
-    eLast->set(&gloeph);
-    _eph.insert(prn, new t_ephPair(eLast));
+    bool timeChanged;
+    eLast->set(&gloeph, timeChanged);
+    if (timeChanged) {
+      delete eLast;
+    }
+    else {
+      _eph.insert(prn, new t_ephPair(eLast));
+    }
   }
   ephBufferChanged();
