- Timestamp:
- 01/31/12 11:26:51 (13 years ago)
- Location:
- trunk/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mbase/MTime.cc
r9564 r12797 420 420 // "yyyy-mm-dd hh:mm:ss" 421 421 // 422 Bool_t MTime::SetSqlDateTime( const char *str)423 { 424 if ( !str)422 Bool_t MTime::SetSqlDateTime(TString str) 423 { 424 if (str.IsNull()) 425 425 return kFALSE; 426 426 427 str.ReplaceAll("T", ""); 428 429 if (str.Contains('.')) 430 str += "000"; 431 427 432 UInt_t y, mon, d, h, m, s, ms; 428 433 429 if (7==sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u.% u", &y, &mon, &d, &h, &m, &s, &ms))434 if (7==sscanf(str, "%04u-%02u-%02u %02u:%02u:%02u.%03u", &y, &mon, &d, &h, &m, &s, &ms)) 430 435 return Set(y, mon, d, h, m, s, ms); 431 436 -
trunk/Mars/mbase/MTime.h
r9208 r12797 94 94 void Set(const struct timeval &tv); 95 95 Bool_t SetString(const char *str); 96 Bool_t SetSqlDateTime( const char *str);96 Bool_t SetSqlDateTime(TString str); 97 97 Bool_t SetSqlTimeStamp(const char *str); 98 98 void SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0);
Note:
See TracChangeset
for help on using the changeset viewer.