Adding time format with microseconds.

parent 578159f7
......@@ -381,6 +381,26 @@ namespace Arc {
return ss.str();
}
case UserExtTime:
{
tm tmtime;
localtime_r(&gtime, &tmtime);
std::stringstream ss;
ss << std::setfill('0');
ss << std::setw(4) << tmtime.tm_year + 1900 << '-'
<< std::setw(2) << tmtime.tm_mon + 1 << '-'
<< std::setw(2) << tmtime.tm_mday << ' '
<< std::setw(2) << tmtime.tm_hour << ':'
<< std::setw(2) << tmtime.tm_min << ':'
<< std::setw(2) << tmtime.tm_sec << '.'
<< std::setw(6) << gnano/1000;
return ss.str();
}
case MDSTime:
{
tm tmtime;
......
......@@ -23,7 +23,8 @@ namespace Arc {
ISOTime, ///< YYYY-MM-DDTHH:MM:SS+HH:MM
UTCTime, ///< YYYY-MM-DDTHH:MM:SSZ
RFC1123Time, ///< Day, DD Mon YYYY HH:MM:SS GMT
EpochTime ///< 1234567890
EpochTime, ///< 1234567890
UserExtTime ///< YYYY-MM-DD HH:MM:SS.mmmmmm
};
/// Base to use when constructing a new Period.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment