Index: trunk/SophyaLib/BaseTools/dvlist.cc
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.cc	(revision 2825)
+++ trunk/SophyaLib/BaseTools/dvlist.cc	(revision 2826)
@@ -49,10 +49,12 @@
    Variables names should not contain space characters and is limited to 64
    characters. The DVList class uses \b SOPHYA::MuTyV objects to hold values
-   of type string, integer (\b int_8) or float (\b r_8). A comment string
-   can be associated with each variable name. A global comment string
+   of type string, integer (\b int_8) or float (\b r_8) or time/date (TimeStamp). 
+   A comment string can be associated with each variable name. A global comment string
    can be attached to the DVList object. DVList objects can conveniently be 
    used to represent FITS headers. The class \b SOPHYA::ObjFileIO<DVList>
    handles serialisation for DVList. (See SOPHYA::PPersist ).
+
    \sa SOPHYA::ObjFileIO<DVList>
+   \sa SOPHYA::MuTyV
 
    \code
@@ -65,4 +67,5 @@
    dvl("hello") = 88;
    dvl("Hello") = 77.77;    
+   dvl("ToDay") = TimeStamp();    
    dvl.Comment() = "DVList test object, with values named hello, Hello ";
    // Saving the dvl object into a PPF file 
@@ -333,4 +336,12 @@
 
 /* --Methode-- */
+/*! Appends or sets the TimeStamp value \b val in the list with name \b key */
+void        DVList::SetT(string const& key, TimeStamp const& val)
+{
+MuTyV div(val);
+Get(key) = div;
+}
+
+/* --Methode-- */
 /*! Assigns the comment \b comm with the name \b key . 
     Does nothing if the entry with name is not present in the list   */
@@ -408,4 +419,5 @@
 if (comment.length() > 0)  os << comment << endl;
 char buff[1024];
+TimeStamp ts; 
 ValList::const_iterator it;
 for(it = mvlist.begin(); it != mvlist.end(); it++)  {
@@ -427,4 +439,9 @@
       sprintf(buff, "%s = %s (string) %s\n", (*it).first.substr(0,64).c_str(), 
 	      (*it).second.elval.GetStringPointer()->substr(0,800).c_str(), (*it).second.elcomm.substr(0,128).c_str());
+      break;
+    case MuTyV::MTVTimeStamp :
+      ts.Set((*it).second.elval.GetRealPart());
+      sprintf(buff, "%s = %s (TimeStamp) %s\n", (*it).first.substr(0,64).c_str(), 
+		ts.ToString().c_str(), (*it).second.elcomm.substr(0,128).c_str());
       break;
     default :
@@ -514,4 +531,8 @@
       sfw = buf;  s.PutStr(sfw);
       break;
+    case MuTyV::MTVTimeStamp : 
+      sprintf(buf,"T %s %.20g\n", (*it).first.substr(0,64).c_str(), (*it).second.elval.GetRealPart() );
+      sfw = buf;  s.PutStr(sfw);
+      break;
     default :
       break;
@@ -524,5 +545,5 @@
 }
 
-sfw = "ZZZZZ--End-of-Varible-List------"; s.PutStr(sfw);
+sfw = "ZZZZZ--End-of-Variable-List------"; s.PutStr(sfw);
 }
 
@@ -587,4 +608,9 @@
       dobj->SetS(key, buf+j+1);
       break;
+    case 'T' :
+      dv = atof(buf+j+1);
+      key = buf+2;
+      dobj->SetT(key, TimeStamp(dv));
+      break;
     default :
       break;
Index: trunk/SophyaLib/BaseTools/dvlist.h
===================================================================
--- trunk/SophyaLib/BaseTools/dvlist.h	(revision 2825)
+++ trunk/SophyaLib/BaseTools/dvlist.h	(revision 2826)
@@ -53,4 +53,5 @@
   void              SetS(string const& key, char const*  val);
   void              SetS(string const& key, string const& val);
+  void              SetT(string const& key, TimeStamp const& val);
   void              SetComment(string const& key, string const& comm);
 
Index: trunk/SophyaLib/BaseTools/mutyv.cc
===================================================================
--- trunk/SophyaLib/BaseTools/mutyv.cc	(revision 2825)
+++ trunk/SophyaLib/BaseTools/mutyv.cc	(revision 2826)
@@ -15,6 +15,11 @@
    \ingroup BaseTools
    Simple utility class which can be used to hold values of type
-   string, integer (\b int_8) or float (\b r_8) as well as complex,
+   string, integer (\b int_8), float (\b r_8), complex and 
+   date/time (TimeStamp). Date/time values are kept internally 
+   as double precision values and are thus less precise than 
+   TimeStamp objects. 
    It provides also easy conversion methods between these types. 
+
+   \sa SOPHYA::TimeStamp
 
    \code
@@ -28,5 +33,7 @@
    MuTyV mvs("Bonjour !");  // mvs contains the string "Bonjour !"
    string s = mvs;          // s contains "Bonjour !"
-  
+   TimeStamp ts;      // Current date/time
+   MuTyV mvt = ts;
+   s = mvt;           // s contains the current date in string format
    \endcode
 */
@@ -74,4 +81,14 @@
 
 /* --Methode-- */
+MuTyV::MuTyV(TimeStamp const& ts)
+{
+  typ = MTVTimeStamp;
+  dv = ts.ToDays();
+  dv_im = 0.;
+  iv = (int_8)dv;
+  strv = NULL;
+}
+
+/* --Methode-- */
 MuTyV & MuTyV::operator= (MuTyV const & a)
 {
@@ -85,5 +102,5 @@
 
 /* --Methode-- */
-char * MuTyV::operator= (char* s)
+const char * MuTyV::operator= (const char* s)
 {
   typ = MTVString;
@@ -96,5 +113,5 @@
 
 /* --Methode-- */
-string & MuTyV::operator= (string& s)
+string const & MuTyV::operator= (string const& s)
 {
   typ = MTVString;
@@ -107,7 +124,19 @@
 
 /* --Methode-- */
+TimeStamp const & MuTyV::operator= (TimeStamp const& ts)
+{
+  typ = MTVTimeStamp;
+  dv = ts.ToDays();
+  dv_im = 0.;
+  iv = (int_8)dv;
+  return(ts);
+}
+
+
+/* --Methode-- */
 MuTyV::operator string() const 
 {
   if (typ == MTVString)  return(*strv);
+  else if (typ == MTVTimeStamp) { return TimeStamp(dv).ToString(); }
   else {
     char buff[96];
@@ -120,5 +149,9 @@
 }
 
-
+/* --Methode-- */
+MuTyV::operator TimeStamp() const 
+{
+  return TimeStamp(dv);
+}
 
 static void mutyv_decodestr(string const & s, double& r, double& im)
Index: trunk/SophyaLib/BaseTools/mutyv.h
===================================================================
--- trunk/SophyaLib/BaseTools/mutyv.h	(revision 2825)
+++ trunk/SophyaLib/BaseTools/mutyv.h	(revision 2826)
@@ -10,4 +10,6 @@
 #include <string>
 #include <complex>
+#include "timestamp.h"
+
 #include <iostream>
 
@@ -24,5 +26,6 @@
     MTVFloat,
     MTVComplex,
-    MTVString
+    MTVString,
+    MTVTimeStamp
   };
 
@@ -42,5 +45,6 @@
          MuTyV(char const* s);  
          MuTyV(string const& s); 
- 
+         MuTyV(TimeStamp const& ts); 
+
          ~MuTyV();
  
@@ -56,6 +60,7 @@
   inline MuTyV & operator= (complex<r_8> const& v) { typ = MTVComplex; dv = (r_8)v.real();  dv_im = v.imag();
                                                     iv = (int_8)dv;  return(*this); }
-         char*  operator= (char* s);
-         string& operator= (string& s);
+         const char*  operator= (const char* s);
+         string const& operator= (string const & s);
+         TimeStamp const& operator= (TimeStamp const & s);
 
   inline operator uint_2() const { return((uint_2)iv); }
@@ -70,4 +75,5 @@
 
          operator string() const ; 
+         operator TimeStamp() const ; 
 
   inline MTVType Type() const { return typ; }
@@ -81,5 +87,5 @@
   r_8 dv;
   r_8 dv_im;   /* for holding imaginary part of a complex */
-  string * strv; 
+  string * strv;
   MTVType typ;
 
Index: trunk/SophyaLib/BaseTools/rawstream.cc
===================================================================
--- trunk/SophyaLib/BaseTools/rawstream.cc	(revision 2825)
+++ trunk/SophyaLib/BaseTools/rawstream.cc	(revision 2826)
@@ -42,5 +42,5 @@
 RawInOutStream& RawInOutStream::read(char* s, uint_8 n)
 {
-  throw NotAvailableOperation("RawInOutStream::seekg() - Not implemented ");
+  throw NotAvailableOperation("RawInOutStream::read() - Not implemented ");
 }
 /* --Methode-- */
@@ -59,5 +59,5 @@
 RawInOutStream& RawInOutStream::write(const char* s, uint_8 n)
 {
-  throw NotAvailableOperation("RawInOutStream::seekp() - Not implemented ");
+  throw NotAvailableOperation("RawInOutStream::write() - Not implemented ");
 }
 
Index: trunk/SophyaLib/BaseTools/sversion.h
===================================================================
--- trunk/SophyaLib/BaseTools/sversion.h	(revision 2825)
+++ trunk/SophyaLib/BaseTools/sversion.h	(revision 2826)
@@ -3,5 +3,5 @@
 
 #define SOPHYA_VERSION   1.9
-#define SOPHYA_REVISION  10
+#define SOPHYA_REVISION  15
 #define SOPHYA_TAG       "V_Oct2005"
 
Index: trunk/SophyaLib/BaseTools/timestamp.cc
===================================================================
--- trunk/SophyaLib/BaseTools/timestamp.cc	(revision 2825)
+++ trunk/SophyaLib/BaseTools/timestamp.cc	(revision 2826)
@@ -69,4 +69,9 @@
 }
 
+TimeStamp::TimeStamp(int_8 days, r_8 seconds)
+{
+  Set(days, seconds);
+}
+
 TimeStamp::TimeStamp(string& date, string& hour)
 {
@@ -90,12 +95,25 @@
 void TimeStamp::Set(double days)
 {
-  if (days < 0.) {
-    mDays = days;
-    mSeconds = (days-mDays)*86400.;
+  if (days >= 0.) {
+    mDays = trunc(days);
+    mSeconds = (days-trunc(days))*86400.;
   }
   else {
-    mDays = trunc(days)-1;
-    mSeconds = (days-mDays)*86400.;
-  }
+    if ( (trunc(days)-days) > 0.) {
+      mDays = trunc(days)-1;
+      mSeconds = (days-mDays)*86400.;
+    }
+    else {
+      mDays = trunc(days);
+      mSeconds = 0.;
+    }
+  }
+}
+
+void TimeStamp::Set(int_8 days, r_8 seconds)
+{
+  if ( (seconds < 0.) || (seconds > 86400.) ) 
+    throw ParmError("TimeStamp::Set(int_8, r_8) seconds<0 or seconds>86400.");
+  mDays = days;
 }
 
@@ -178,6 +196,9 @@
   seconds -= hour*3600;
   min = trunc(seconds/60.);
+  while (min >= 60) { hour++; min -= 60; }
   sec = seconds-min*60;
-}
+  while (sec >= 60.) { min++; sec -= 60.; }
+}
+
 double TimeStamp::ToDays() const
 {
@@ -185,5 +206,9 @@
 }
 
-string TimeStamp::ToString() const
+/*!
+\param fgday : if false, ignore the date (dd/mm/yy) part 
+\param fghour : if false, ignore the hour (hh:mm:ss) part
+*/
+string TimeStamp::ToString(bool fgday, bool fghour) const
 {
   char buff[128];
@@ -193,11 +218,20 @@
   GetDate(aa, mm, jj);
   GetHour(hh, min, sec);
-  sprintf(buff,"%02d/%02d/%02d %02d:%02d:%02.1f GMT", jj,mm,aa,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);
   return buff;
 }
 
-void TimeStamp::Print(ostream& os)  const
-{
-  os << " " << ToString() << " "; 
+/*!
+\param fgday : if false, ignore the date (dd/mm/yy) part 
+\param fghour : if false, ignore the hour (hh:mm:ss) part
+*/
+void TimeStamp::Print(ostream& os, bool fgday, bool fghour)  const
+{
+  os << " " << ToString(fgday, fghour) << " "; 
 }
 
Index: trunk/SophyaLib/BaseTools/timestamp.h
===================================================================
--- trunk/SophyaLib/BaseTools/timestamp.h	(revision 2825)
+++ trunk/SophyaLib/BaseTools/timestamp.h	(revision 2826)
@@ -32,4 +32,6 @@
   //! Constructor with specification of number of days since 0 Jan 1901 0h TU 
   TimeStamp(double days);
+  //! Constructor from number of days (since 0/01/1901) and number of seconds 
+  TimeStamp(int_8 days, r_8 seconds);
   //! Constructor with specification of day,month,year,hour,minutes,seconds 
   TimeStamp(int year, int month, int day, int hour, int min, double sec);
@@ -42,4 +44,6 @@
   //! Sets the value of the time stamp from the number of days since 0 Jan 1901 0h TU 
   void Set(double days);
+  //! Sets the value of the time stamp from the number of days and seconds
+  void Set(int_8 days, r_8 seconds);
   //! initialize with current date and time (GMT)
   void SetNow();
@@ -70,16 +74,21 @@
   //! Return the value of the TimeStamp as days.fraction_days since 0 Jan 1901
   double ToDays() const;
-  //! Conversion operator to double
+  //! Conversion operator to double - return ToDays() 
   inline operator double() const { return ToDays(); }
 
   //! Return the timestamp in string format 
-  string ToString() const;
+  string ToString(bool fgday=true, bool fghour=true) const;
   
-  /*! Prints the date/time in string format on \b cout */
-  inline  void    Print() const  { Print(cout); }  
-  /*! Prints the date/time in string format on stream \b os */
-  virtual void    Print(ostream& os)  const;
+  //! Return the integral number of days since 0 Jan 1901
+  inline int_8 DaysPart() { return mDays; }
+  //! Return the fractional number of days in seconds ( 0 < nsec < 86400. )
+  inline r_8 SecondsPart() { return mSeconds; }
 
-  //! 
+  //! Prints the date/time in string format on \b cout 
+  inline  void    Print(bool fgday=true, bool fghour=true) const  
+     { Print(cout, fgday, fghour); }  
+  //! Prints the date/time in string format on stream \b os 
+  virtual void    Print(ostream& os, bool fgday=true, bool fghour=true)  const;
+
   //! Number of days in a given month  
   static int   MonthDays(int year, int month);
