Changeset 10252 for trunk/FACT++/src/Time.cc
- Timestamp:
- 03/23/11 10:47:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Time.cc
r10183 r10252 35 35 36 36 // strftime 37 const _time_format Time::reset = 0; 38 const _time_format Time::def = "%c"; 39 const _time_format Time::std = "%x %X%F"; 40 const _time_format Time::sql = "%Y-%m-%d %H:%M:%S.%f"; 41 const _time_format Time::iso = "%Y%m%dT%H%M%S%F%q"; 42 const _time_format Time::magic = "%Y %m %d %H %M %S %f"; 37 const _time_format Time::reset = 0; 38 const _time_format Time::def = "%c"; 39 const _time_format Time::std = "%x %X%F"; 40 const _time_format Time::sql = "%Y-%m-%d %H:%M:%S.%f"; 41 const _time_format Time::ssql = "%Y-%m-%d %H:%M:%S"; 42 const _time_format Time::iso = "%Y%m%dT%H%M%S%F%q"; 43 const _time_format Time::magic = "%Y %m %d %H %M %S %f"; 44 const _time_format Time::smagic = "%Y %m %d %H %M %S"; 43 45 44 46 /* … … 118 120 void Time::Mjd(double mjd) 119 121 { 122 // Convert MJD to seconds since offset 120 123 mjd -= 40587; 121 124 mjd *= 24*60*60; … … 141 144 142 145 const int exp = tod.num_fractional_digits(); 143 const double sec = tod.fractional_seconds()/pow(10, exp); 146 147 const double frac = tod.fractional_seconds()/pow(10, exp); 148 const double sec = tod.total_seconds()+frac; 144 149 145 150 return date().modjulian_day()+sec/(24*60*60);
Note:
See TracChangeset
for help on using the changeset viewer.