10 #ifndef smtk_common_DateTime_h
11 #define smtk_common_DateTime_h
13 #include "smtk/CoreExports.h"
14 #include "smtk/SystemConfig.h"
15 #include "smtk/common/CompilerInformation.h"
16 #include "smtk/common/TimeZone.h"
18 SMTK_THIRDPARTY_PRE_INCLUDE
19 #include <boost/date_time/posix_time/ptime.hpp>
20 SMTK_THIRDPARTY_POST_INCLUDE
48 return this->setComponents(year, month, day, hour, minute, second, millisecond, &timeZone);
61 return this->setComponents(year, month, day, hour, minute, second, millisecond,
nullptr);
73 int& millisecond)
const
75 return this->components(year, month, day, hour, minute, second, millisecond, &timeZone);
80 components(
int& year,
int& month,
int& day,
int& hour,
int& minute,
int& second,
int& millisecond)
83 return this->components(year, month, day, hour, minute, second, millisecond,
nullptr);
90 bool deserialize(
const std::string& ts);
93 std::string serialize()
const;
96 bool parseBoostFormat(
const std::string& ts);
102 bool operator==(
const DateTime& dt)
const;
103 bool operator<(
const DateTime& dt)
const;
104 bool operator>(
const DateTime& dt)
const;
107 boost::posix_time::ptime m_ptime;
127 TimeZone* timeZone)
const;
133 #endif // smtk_common_DateTime_h