Index: trunk/BNS/bnseph.cpp
===================================================================
--- trunk/BNS/bnseph.cpp	(revision 2259)
+++ trunk/BNS/bnseph.cpp	(revision 2260)
@@ -20,4 +20,8 @@
 #include "bnsutils.h" 
 #include "bnssettings.h" 
+#include "bnctime.h" 
+extern "C" {
+#include "RTCM/rtcm3torinex.h"
+}
 
 #define PI          3.1415926535898
@@ -493,17 +497,20 @@
       
       if (year < 100) year += 2000;
+
+      bncTime tHlp; 
+      tHlp.set(int(year), int(month), int(day), 
+               int(hour), int(minute), second);
       
-      QDateTime* dateTime = new QDateTime(QDate(int(year), int(month), int(day)), 
-                                          QTime(int(hour), int(minute), int(second)), Qt::UTC);
-
-      GPSweekFromDateAndTime(*dateTime, _GPSweek, _GPSweeks); 
- 
-      delete dateTime;
-
-      //// beg test
-      //// _gps_utc = 14.0;
-      //// end test
-
+      _GPSweek  = tHlp.gpsw();
+      _GPSweeks = tHlp.gpssec();
+
+      // Correct UTC -> GPS;
+      // -------------------
+      _gps_utc = gnumleap(int(year), int(month), int(day));
       _GPSweeks += _gps_utc;
+      if (_GPSweeks > 86400.0) {
+        _GPSweek  += 1;
+        _GPSweeks -= 86400.0;
+      }
     }
     else if (ii == 2) {
