Changeset 10253
- Timestamp:
- 03/23/11 10:48:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/time.cc
r10251 r10253 54 54 55 55 // Stream the time in its sql representation into the stringstream 56 str << Time::s ql << bd;56 str << Time::ssql << bd; 57 57 58 58 // Stream a time from the stringstream considering an sql representation 59 59 // into a Time object 60 60 Time tm; 61 str >> Time::s ql >> tm;61 str >> Time::ssql >> tm; 62 62 63 63 // Output stream and interpreted time 64 64 cout << "Stream: " << str.str() << endl; 65 cout << "Time: " << Time::s ql << tm << endl;65 cout << "Time: " << Time::ssql << tm << endl; 66 66 cout << endl; 67 67 … … 73 73 cout << endl; 74 74 75 // Set and get a Time from a string 76 const string s = "2042-12-24 12:42:42"; 77 78 Time tstr; 79 tstr.SetFromStr(s); 80 cout << "String: " << s << endl; 81 cout << "TimeFromStr: " << tstr.GetAsStr() << endl; 82 cout << endl; 83 84 // Calculate with times 75 85 const Time t0; 76 86 Time t1 = t0;
Note:
See TracChangeset
for help on using the changeset viewer.