Changeset 4627 for trunk/MagicSoft/Mars/mbase
- Timestamp:
- 08/16/04 14:24:47 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MTime.cc
r4563 r4627 333 333 334 334 return kTRUE; 335 336 335 } 337 336 … … 481 480 // -------------------------------------------------------------------------- 482 481 // 482 // Set the time according to the format fmt. 483 // Default is "%A %e.%B %Y %H:%M:%S" 484 // 485 // For more information see GetStringFmt 486 // 487 Bool_t MTime::SetStringFmt(const char *time, const char *fmt) 488 { 489 if (!fmt) 490 fmt = "%A %e.%B %Y %H:%M:%S"; 491 492 struct tm t; 493 memset(&t, 0, sizeof(struct tm)); 494 strptime(time, fmt, &t); 495 496 return Set(t.tm_year+1900, t.tm_mon+1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec); 497 } 498 499 // -------------------------------------------------------------------------- 500 // 483 501 // Return contents as a TString of the form: 484 502 // "yyyy-mm-dd hh:mm:ss" -
trunk/MagicSoft/Mars/mbase/MTime.h
r4563 r4627 81 81 Bool_t SetSqlTimeStamp(const char *str); 82 82 void SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0); 83 Bool_t SetStringFmt(const char *time, const char *fmt); 83 84 Bool_t UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns); 84 85 Bool_t SetMjd(UInt_t mjd, ULong_t ms, UInt_t ns=0);
Note:
See TracChangeset
for help on using the changeset viewer.