gpsSecondToUTCDateTime.cc
Go to the documentation of this file.
1 #include <utl/TimeStamp.h>
2 #include <utl/UTCDateTime.h>
3 #include <boost/lexical_cast.hpp>
4 #include <iostream>
5 
6 using namespace boost;
7 using namespace utl;
8 using namespace std;
9 
10 
11 int
12 main(int argc, char* argv[])
13 {
14  if (argc != 2) {
15  cerr << "argument missing: GPS second" << endl;
16  return 1;
17  }
18 
19  const unsigned gpsSecond = lexical_cast<unsigned>(argv[1]);
20 
21  const TimeStamp t(gpsSecond);
22 
23  const UTCDateTime utc(t);
24 
25  cout << utc << endl;
26 
27  return 0;
28 }
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
int main(int argc, char *argv[])
Definition: DBSync.cc:58

, generated on Tue Sep 26 2023.