FACT++  1.0
void Time::SetFromStr ( const std::string &  str,
const char *  format = "%Y-%m-%d %H:%M:%S" 
)

Sets the time of the Time object to a time corresponding to the one given as argument. It is evaluated according to the given format.

Parameters
strThe time as a string which should be converted to the Time object
formatformat description of the string to be returned. For details see the boost documentation or the man page of strftime
Examples:
time.cc.

Definition at line 273 of file Time.cc.

References fmt(), and str.

Referenced by main().

274 {
275  // FIXME: exception handline
276  stringstream stream;
277  stream << str;
278  stream >> Time::fmt(format) >> *this;
279 }
char str[80]
Definition: test_client.c:7
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: