Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 4626)
+++ trunk/MagicSoft/Mars/Changelog	(revision 4627)
@@ -26,4 +26,7 @@
      - change to support also 'No calibration of data'
      - removed obsolete dependancie on *'FromData' containers
+
+   * mbase/MTime.[h,cc]:
+     - added new member function SetStringFmt
 
 
Index: trunk/MagicSoft/Mars/mbase/MTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 4626)
+++ trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 4627)
@@ -333,5 +333,4 @@
 
     return kTRUE;
-
 }
 
@@ -481,4 +480,23 @@
 // --------------------------------------------------------------------------
 //
+// Set the time according to the format fmt.
+// Default is "%A %e.%B %Y %H:%M:%S"
+//
+// For more information see GetStringFmt
+//
+Bool_t MTime::SetStringFmt(const char *time, const char *fmt)
+{
+    if (!fmt)
+        fmt = "%A %e.%B %Y %H:%M:%S";
+
+    struct tm t;
+    memset(&t, 0, sizeof(struct tm));
+    strptime(time, fmt, &t);
+
+    return Set(t.tm_year+1900, t.tm_mon+1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec);
+}
+
+// --------------------------------------------------------------------------
+//
 // Return contents as a TString of the form:
 //   "yyyy-mm-dd hh:mm:ss"
Index: trunk/MagicSoft/Mars/mbase/MTime.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.h	(revision 4626)
+++ trunk/MagicSoft/Mars/mbase/MTime.h	(revision 4627)
@@ -81,4 +81,5 @@
     Bool_t   SetSqlTimeStamp(const char *str);
     void     SetCT1Time(UInt_t mjd, UInt_t t1, UInt_t t0);
+    Bool_t   SetStringFmt(const char *time, const char *fmt);
     Bool_t   UpdMagicTime(Byte_t h, Byte_t m, Byte_t s, UInt_t ns);
     Bool_t   SetMjd(UInt_t mjd, ULong_t ms, UInt_t ns=0);
