Index: /branches/BNC_2.12/src/bnctime.cpp
===================================================================
--- /branches/BNC_2.12/src/bnctime.cpp	(revision 8716)
+++ /branches/BNC_2.12/src/bnctime.cpp	(revision 8717)
@@ -18,5 +18,5 @@
   this->set(gpsw, gpssec);
 }
-  
+
 // Constructor (from ISO String yyyy-mm-ddThh:mm:ss)
 //////////////////////////////////////////////////////////////////////////////
@@ -25,5 +25,5 @@
     QDateTime dt = QDateTime::fromString(isoString.c_str(), Qt::ISODate);
     this->set(dt.date().year(), dt.date().month(), dt.date().day(),
-              dt.time().hour(), dt.time().minute(), 
+              dt.time().hour(), dt.time().minute(),
               dt.time().second() + dt.time().msec()/1000.0);
   }
@@ -33,5 +33,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime& bncTime::set(int gpsw, double gpssec) {
@@ -74,5 +74,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime &bncTime::set(int msec) {
@@ -86,5 +86,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime &bncTime::setTOD(int msec) {
@@ -109,5 +109,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime &bncTime::setTk(int msec) {
@@ -123,5 +123,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime &bncTime::setBDS(int msec) {
@@ -138,5 +138,5 @@
   return set(week, double(msec/1000.0));
 }
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime& bncTime::setmjd(double daysec, int mjd) {
@@ -154,5 +154,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime& bncTime::setmjd(double mjddec) {
@@ -162,10 +162,10 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 unsigned int bncTime::mjd() const {
   return _mjd;
 }
- 
+
 //
 //////////////////////////////////////////////////////////////////////////////
@@ -183,5 +183,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 double bncTime::gpssec() const {
@@ -203,5 +203,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 double bncTime::bdssec() const {
@@ -216,5 +216,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bool bncTime::operator!=(const bncTime &time1) const {
@@ -227,5 +227,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bool bncTime::operator==(const bncTime &time1) const {
@@ -238,5 +238,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bool bncTime::operator>(const bncTime &time1) const {
@@ -249,5 +249,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bool bncTime::operator>=(const bncTime &time1) const {
@@ -260,5 +260,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bool bncTime::operator<(const bncTime &time1) const {
@@ -271,5 +271,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bool bncTime::operator<=(const bncTime &time1) const {
@@ -282,5 +282,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime bncTime::operator+(double sec) const {
@@ -291,5 +291,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime bncTime::operator-(double sec) const {
@@ -297,5 +297,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 double bncTime::operator-(const bncTime &time1) const {
@@ -312,10 +312,10 @@
   _sec+=sec;
 
-  while ( _sec >= 86400 ) {
-    _sec-=86400;
+  while ( _sec >= 86400.0 ) {
+    _sec-=86400.0;
     _mjd++;
   }
-  while ( _sec < 0 ) {
-    _sec+=86400;
+  while ( _sec < 0.0 ) {
+    _sec+=86400.0;
     _mjd--;
   }
@@ -324,5 +324,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 void bncTime::civil_date (unsigned int& year, unsigned int& month,
@@ -336,7 +336,7 @@
 }
 
-// 
-//////////////////////////////////////////////////////////////////////////////
-void bncTime::civil_time(unsigned int &hour, unsigned int &min, 
+//
+//////////////////////////////////////////////////////////////////////////////
+void bncTime::civil_time(unsigned int &hour, unsigned int &min,
                           double &sec) const {
   hour = static_cast<unsigned int>(_sec/3600.0);
@@ -353,5 +353,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 string bncTime::timestr(unsigned numdec, char sep) const {
@@ -387,5 +387,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 string bncTime::datestr(char sep) const {
@@ -403,5 +403,5 @@
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime::operator std::string() const {
@@ -409,25 +409,25 @@
 }
 
-// 
-//////////////////////////////////////////////////////////////////////////////
-bncTime& bncTime::set(int year, int month, int day, 
+//
+//////////////////////////////////////////////////////////////////////////////
+bncTime& bncTime::set(int year, int month, int day,
                       int hour, int min, double sec) {
   return set(year, month, day, hour*3600 + min*60 + sec);
 }
 
-// 
-//////////////////////////////////////////////////////////////////////////////
-bncTime& bncTime::setBDS(int year, int month, int day, 
+//
+//////////////////////////////////////////////////////////////////////////////
+bncTime& bncTime::setBDS(int year, int month, int day,
                       int hour, int min, double sec) {
   return set(year, month, day, hour*3600 + min*60 + sec+14.0);
 }
 
-// 
+//
 //////////////////////////////////////////////////////////////////////////////
 bncTime& bncTime::set(int year, int month, int day, double daysec) {
   _sec = daysec;
-  
+
   _mjd = (unsigned int)djul(year, month, day);
-  
+
   while ( _sec >= 86400 ) {
     _sec-=86400;
