FACT++  1.0
string Time::GetAsStr ( const char *  format = "%Y-%m-%d %H:%M:%S") const

Returns a string with the contents of the Time object formated as defined in format.

Parameters
formatformat description of the string to be returned. For details see the boost documentation or the man page of strftime
Returns
A string with the time formatted as requested. Note some special strings might be returned in case the time is invalid.
Examples:
time.cc.

Definition at line 240 of file Time.cc.

References fmt(), and _time_format::str().

Referenced by StateMachineImp::AddEvent(), DataLogger::CompileFileNameWithPath(), Main::execute(), StateMachineDim::exitHandler(), FillSql(), EventImp::GetTimeAsStr(), FactGui::handleFadToolTip(), StateMachineSmartFACT::HandleGpsNema(), StateMachineSmartFACT::HandleMagicWeatherData(), ConnectionDrive::HandlePdo1(), ConnectionSQM::HandleRead(), ConnectionLidar::HandleRead(), ConnectionWeather::HandleRead(), FactGui::handleWrite(), FactGui::infoHandlerService(), EventBuilderWrapper::InitRunNumber(), main(), operator<<(), EventImp::Print(), Print(), ServiceList::ProcessServerList(), ConnectionGCN::ProcessXml(), StateMachineImp::SetCurrentState(), FactGui::SetFadLed(), FactGui::SetFscValue(), FactGui::SetLedColor(), StateMachineSmartFACT::UpdateAstronomy(), StateMachineDrive< T, S >::UpdatePointingPosition(), StateMachineDrive< T, S >::UpdateTrackingPosition(), MessageImp::Write(), and MessageImp::WriteImp().

241 {
242  stringstream out;
243  out << Time::fmt(format) << *this;
244  return out.str();
245 }
std::string str() const
Definition: Time.h:27
static const _time_format fmt(const char *txt=0)
A stream manipulator to set the output/input format.
Definition: Time.cc:415

+ Here is the call graph for this function:

+ Here is the caller graph for this function: