21 Timestamp unixCreation(
zero);
23 long int aTime = 4000;
25 Timestamp aTimestamp(aTime);
28 std::cout <<
"unix creation time is " << unixCreation.
getString()
32 std::cout <<
"aTimestamp is " << aTimestamp.getString()
35 std::cout <<
"cur time (GMT) is " << cur.
getString()
38 std::string missionStartString(
"2001-1-1 00:00");
40 Timestamp missionStart(missionStartString);
42 std::cout <<
"Supplied string: " << missionStartString << std::endl;
43 std::cout <<
"Retrieved: " << missionStart.getString() << std::endl;
45 std::string PDTString(
"2005-4-4 12:25");
46 Timestamp PDTTime(PDTString, 25200);
48 std::cout <<
"Supplied PDT string: " << PDTString << std::endl;
49 std::cout <<
"Retrieved: " << PDTTime.getString() << std::endl;
51 catch (
const BadTimeInput e) {
52 std::cout <<
"Exception message: " << e.complaint << std::endl;
std::string getString() const
Return string representation of time, not including nanoseconds;.