- Timestamp:
- 08/16/04 14:24:47 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4624 r4627 26 26 - change to support also 'No calibration of data' 27 27 - removed obsolete dependancie on *'FromData' containers 28 29 * mbase/MTime.[h,cc]: 30 - added new member function SetStringFmt 28 31 29 32 -
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.