- Timestamp:
- Sep 7, 2006, 6:50:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncutils.cpp
r93 r124 16 16 * -----------------------------------------------------------------------*/ 17 17 18 #include <iostream> 19 18 20 #include <QRegExp> 19 21 #include <QStringList> 20 22 21 23 #include "bncutils.h" 24 25 using namespace std; 22 26 23 27 void expandEnvVar(QString& str) { … … 35 39 36 40 } 41 42 QDateTime dateAndTimeFromGPSweek(int GPSWeek, double GPSWeeks) { 43 44 static const QDate zeroEpoch(1980, 1, 6); 45 46 QDate date(zeroEpoch); 47 QTime time(0,0,0,0); 48 49 int weekDays = int(GPSWeeks) / 86400; 50 date = date.addDays( GPSWeek * 7 + weekDays ); 51 time = time.addMSecs( int( (GPSWeeks - 86400 * weekDays) * 1e3 ) ); 52 53 return QDateTime(date,time); 54 }
Note:
See TracChangeset
for help on using the changeset viewer.