Index: trunk/SophyaLib/BaseTools/dvlist.cc
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.cc	(revision 2829)
+++ trunk/SophyaLib/BaseTools/dvlist.cc	(revision 2830)
@@ -496,4 +496,7 @@
 void        ObjFileIO<DVList>::WriteSelf(POutPersist& s) const
 {
+if (dobj == NULL)
+  throw NullPtrError("ObjFileIO<DVList>::WriteSelf() dobj=NULL");
+
 char buf[1024];
 string sfw;
Index: trunk/SophyaLib/BaseTools/sophyainit.cc
===================================================================
--- trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 2829)
+++ trunk/SophyaLib/BaseTools/sophyainit.cc	(revision 2830)
@@ -81,4 +81,8 @@
   DObjRegister(FIO_NDataBlock< complex<r_8> >, NDataBlock< complex<r_8> >);
 
+  // Enregistrement des handlers PPF pour les TimeStamp
+  PPRegister(ObjFileIO<TimeStamp>);
+  DObjRegister(ObjFileIO<TimeStamp>, TimeStamp);
+
   // Enregistrement des handlers PPF pour les DVList
   PPRegister(ObjFileIO<DVList>);
@@ -133,4 +137,7 @@
   DObjRegister(PPFWrapperSTLVector< string >, std::vector<string>);
 
+  PPRegister(PPFWrapperSTLVector< TimeStamp >);
+  DObjRegister(PPFWrapperSTLVector< TimeStamp >, std::vector<TimeStamp>);
+
 
 #if (!defined(__GNUG__) && !defined(__MWERKS__) && !defined(HPUX))
Index: trunk/SophyaLib/BaseTools/timestamp.cc
===================================================================
--- trunk/SophyaLib/BaseTools/timestamp.cc	(revision 2829)
+++ trunk/SophyaLib/BaseTools/timestamp.cc	(revision 2830)
@@ -74,5 +74,5 @@
 }
 
-TimeStamp::TimeStamp(string& date, string& hour)
+TimeStamp::TimeStamp(string const & date, string const & hour)
 {
   SetDate(date);
@@ -86,4 +86,13 @@
 }
 
+TimeStamp::TimeStamp(string& datim)
+{
+  Set(datim);
+}
+
+TimeStamp::TimeStamp(const char* datim)
+{
+  Set(datim);
+}
 
 void TimeStamp::Set(TimeStamp const & ts)
@@ -96,14 +105,14 @@
 {
   if (days >= 0.) {
-    mDays = trunc(days);
+    mDays = (int_8)trunc(days);
     mSeconds = (days-trunc(days))*86400.;
   }
   else {
     if ( (trunc(days)-days) > 0.) {
-      mDays = trunc(days)-1;
+      mDays = (int_8)trunc(days)-1;
       mSeconds = (days-mDays)*86400.;
     }
     else {
-      mDays = trunc(days);
+      mDays = (int_8)trunc(days);
       mSeconds = 0.;
     }
@@ -116,5 +125,18 @@
     throw ParmError("TimeStamp::Set(int_8, r_8) seconds<0 or seconds>86400.");
   mDays = days;
-}
+  mSeconds = seconds;
+}
+
+void TimeStamp::Set(const char * datim)
+{
+  int year, month, day;
+  int hour, min;
+  double sec;
+  sscanf(datim,"%d-%d-%dT%d:%d:%lf", &year, &month, &day,
+	 &hour, &min, &sec);
+  SetDate(year, month, day);
+  SetHour(hour, min, sec);
+}
+
 
 void TimeStamp::SetNow()
@@ -193,7 +215,7 @@
 {
   double seconds = mSeconds;
-  hour = trunc(seconds/3600.);
+  hour = (int)trunc(seconds/3600.);
   seconds -= hour*3600;
-  min = trunc(seconds/60.);
+  min = (int)trunc(seconds/60.);
   while (min >= 60) { hour++; min -= 60; }
   sec = seconds-min*60;
@@ -207,8 +229,11 @@
 
 /*!
-\param fgday : if false, ignore the date (dd/mm/yy) part 
-\param fghour : if false, ignore the hour (hh:mm:ss) part
+\param fmt : String format for the date 
+  - FmtPackedDateTime : YYYY-MM-DDThh:mm:ss.s
+  - FmtDateOnly : dd/mm/yyyy
+  - FmtTimeOnly : hh:mm:ss.s
+  - FmtDateTime : dd/mm/yyyy hh:mm:ss.s UT
 */
-string TimeStamp::ToString(bool fgday, bool fghour) const
+string TimeStamp::ToString(StrFmt fmt) const
 {
   char buff[128];
@@ -218,20 +243,27 @@
   GetDate(aa, mm, jj);
   GetHour(hh, min, sec);
-  if (!fghour) 
-    sprintf(buff,"%02d/%02d/%02d ", jj,mm,aa);
-  else if (!fgday) 
-    sprintf(buff,"%02d:%02d:%02.3f ", hh,min,sec);
-  else 
-    sprintf(buff,"%02d/%02d/%02d %02d:%02d:%02.1f GMT", jj,mm,aa,hh,min,sec);
+  if (fmt == FmtPackedDateTime) 
+    sprintf(buff,"%04d-%02d-%02dT%02d:%02d:%02.1f", aa,mm,jj, hh,min,sec);
+  else {
+    if (fmt == FmtDateOnly) 
+      sprintf(buff,"%02d/%02d/%04d ", jj,mm,aa);
+    else if (fmt == FmtTimeOnly) 
+      sprintf(buff,"%02d:%02d:%02.3f ", hh,min,sec);
+    else 
+      sprintf(buff,"%02d/%02d/%04d %02d:%02d:%02.1f UT", jj,mm,aa,hh,min,sec);
+  }
   return buff;
 }
 
 /*!
-\param fgday : if false, ignore the date (dd/mm/yy) part 
-\param fghour : if false, ignore the hour (hh:mm:ss) part
+\param fmt : String format for the date 
+  - FmtPackedDateTime : YYYY-MM-DDThh:mm:ss.s
+  - FmtDateOnly : dd/mm/yyyy
+  - FmtTimeOnly : hh:mm:ss.s
+  - FmtDateTime : dd/mm/yyyy hh:mm:ss.s UT
 */
-void TimeStamp::Print(ostream& os, bool fgday, bool fghour)  const
-{
-  os << " " << ToString(fgday, fghour) << " "; 
+void TimeStamp::Print(ostream& os, StrFmt fmt)  const
+{
+  os << " " << ToString(fmt) << " "; 
 }
 
@@ -280,2 +312,44 @@
   return t;
 }
+
+//----------------------------------------------------------
+// Classe pour la gestion de persistance
+// ObjFileIO<TimeStamp>
+//----------------------------------------------------------
+
+/* --Methode-- */
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void        ObjFileIO<TimeStamp>::WriteSelf(POutPersist& s) const
+{
+  if (dobj == NULL)
+    throw NullPtrError("ObjFileIO<TimeStamp>::WriteSelf() dobj=NULL");
+  int_4 ver;
+  ver = 1;
+  s.Put(ver);   // Lecture numero de version PPF
+  s.Put(dobj->DaysPart());
+  s.Put(dobj->SecondsPart());
+}
+
+/* --Methode-- */
+DECL_TEMP_SPEC  /* equivalent a template <> , pour SGI-CC en particulier */
+void        ObjFileIO<TimeStamp>::ReadSelf(PInPersist& s)
+{
+  int_4 ver;
+  s.Get(ver);   // Lecture numero de version PPF
+  r_8 seconds;
+  int_8 days;
+  s.Get(days);
+  s.Get(seconds);
+
+  if (dobj == NULL) dobj = new TimeStamp(days, seconds);
+  else dobj->Set(days, seconds);
+}
+
+
+#ifdef __CXX_PRAGMA_TEMPLATES__
+#pragma define_template ObjFileIO<TimeStamp>
+#endif
+
+#if defined(ANSI_TEMPLATES) || defined(GNU_TEMPLATES)
+template class ObjFileIO<TimeStamp>;
+#endif
Index: trunk/SophyaLib/BaseTools/timestamp.h
===================================================================
--- trunk/SophyaLib/BaseTools/timestamp.h	(revision 2829)
+++ trunk/SophyaLib/BaseTools/timestamp.h	(revision 2830)
@@ -11,4 +11,5 @@
 
 #include "machdefs.h"
+#include "objfio.h"
 #include <string> 
 #include <iostream> 
@@ -17,5 +18,5 @@
   
 //! Class representing date and time
-class TimeStamp {
+class TimeStamp : public AnyDataObj {
 public:
   /*  Pour utilisation ulterieure
@@ -26,4 +27,6 @@
   enum Month {month_January=1, month_February, month_March, month_April, month_May, month_June, month_July,
              month_August, month_September, month_October, month_November, month_December};  
+
+  enum StrFmt { FmtPackedDateTime , FmtDateOnly, FmtTimeOnly, FmtDateTime };
 
   //! Default Constructor : current date and time (GMT)
@@ -36,7 +39,12 @@
   //! Constructor with specification of day,month,year,hour,minutes,seconds 
   TimeStamp(int year, int month, int day, int hour, int min, double sec);
-  //! Constructor with specification of date & time in the format YYYY/MM/DD hh:mm:ss
-  TimeStamp(string& date, string& hour);
+  //! Constructor with specification of date & time in the format YYYY/MM/DD hh:mm:ss  
+  TimeStamp(string const & date, string const & hour);
+  //! Constructor with specification of date & time in the format YYYY/MM/DD hh:mm:ss  
   TimeStamp(const char* date, const char* hour);
+  //! Constructor with specification of date & time in the format YYYY-MM-DDThh:mm:ss 
+  TimeStamp(string& datim);
+  //! Constructor with specification of date & time in the format YYYY-MM-DDThh:mm:ss 
+  TimeStamp(const char* datim);
 
   //! Set the value of the time stamp copying from "ts"
@@ -46,4 +54,8 @@
   //! Sets the value of the time stamp from the number of days and seconds
   void Set(int_8 days, r_8 seconds);
+  //! Sets the value of the time stamp from a string in the format YYYY-MM-DDThh:mm:ss 
+  void Set(const char * datim);
+ //! Sets the value of the time stamp from a string in the format YYYY-MM-DDThh:mm:ss 
+  inline void Set(string const & datim)  { Set(datim.c_str()); }
   //! initialize with current date and time (GMT)
   void SetNow();
@@ -78,5 +90,5 @@
 
   //! Return the timestamp in string format 
-  string ToString(bool fgday=true, bool fghour=true) const;
+  string ToString(StrFmt fmt=FmtPackedDateTime) const;
   
   //! Return the integral number of days since 0 Jan 1901
@@ -86,8 +98,8 @@
 
   //! Prints the date/time in string format on \b cout 
-  inline  void    Print(bool fgday=true, bool fghour=true) const  
-     { Print(cout, fgday, fghour); }  
+  inline  void    Print(StrFmt fmt=FmtDateTime) const  
+     { Print(cout, fmt); }  
   //! Prints the date/time in string format on stream \b os 
-  virtual void    Print(ostream& os, bool fgday=true, bool fghour=true)  const;
+  virtual void    Print(ostream& os, StrFmt fmt=FmtDateTime)  const;
 
   //! Number of days in a given month  
@@ -108,4 +120,11 @@
   {  ts.Print(s);  return(s);  }
 
+/*! Writes the object in the POutPersist stream \b os */
+inline POutPersist& operator << (POutPersist& os, TimeStamp & obj)
+{ ObjFileIO<TimeStamp> fio(&obj);  fio.Write(os);  return(os); }
+/*! Reads the object from the PInPersist stream \b is */
+inline PInPersist& operator >> (PInPersist& is, TimeStamp & obj)
+{ ObjFileIO<TimeStamp> fio(&obj); is.SkipToNextObject(); fio.Read(is); return(is); }
+
 } // namespace SOPHYA
 
