Index: /trunk/BNC/bnctime.cpp
===================================================================
--- /trunk/BNC/bnctime.cpp	(revision 2250)
+++ /trunk/BNC/bnctime.cpp	(revision 2251)
@@ -8,4 +8,18 @@
 
 using namespace std;
+
+double djul(long jj, long mm, double tt) {
+  long    ii, kk;
+  double  djul ;
+  if( mm <= 2 ) {
+    jj = jj - 1;
+    mm = mm + 12;
+  }  
+  ii   = jj/100;
+  kk   = 2 - ii + ii/4;
+  djul = (365.25*jj - fmod( 365.25*jj, 1.0 )) - 679006.0;
+  djul = djul + floor( 30.6001*(mm + 1) ) + tt + kk;
+  return djul;
+} 
 
 // Constructor
@@ -174,2 +188,28 @@
 }
 
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+bncTime& bncTime::set(int year, int month, int day, 
+                      int hour, int min, double sec) {
+  return set(year, month, day, hour*3600 + min*60 + sec);
+}
+
+// 
+//////////////////////////////////////////////////////////////////////////////
+bncTime& bncTime::set(int year, int month, int day, double daysec) {
+  _sec = daysec;
+  
+  _mjd = (unsigned int)djul(year, month, day);
+  
+  while ( _sec >= 86400 ) {
+    _sec-=86400;
+    _mjd++;
+  }
+  while ( _sec <  0 ) {
+    _sec+=86400;
+    _mjd--;
+  }
+
+  return *this;
+}
Index: /trunk/BNC/bnctime.h
===================================================================
--- /trunk/BNC/bnctime.h	(revision 2250)
+++ /trunk/BNC/bnctime.h	(revision 2251)
@@ -11,4 +11,6 @@
 
   bncTime& set(int gpsw, double gpssec);
+  bncTime& set(int year, int month, int day, int hour, int min, double sec);
+  bncTime& set(int year, int month, int day, double daysec);
 
   unsigned int mjd()    const;
