Go to the documentation of this file.
45 CETime(std::vector<double> time,
58 double Hour(
void)
const;
59 double Min(
void)
const;
60 double Sec(
void)
const;
64 static double UTC(
const double& jd) ;
65 static std::vector<double>
UTC_vect(
const double& jd) ;
69 static std::vector<double>
TimeDbl2Vect(
const double& time) ;
81 localtime_r(&now, &local) ;
82 return local.tm_gmtoff/3600.0;
89 void SetTime(
const double& time,
91 void SetTime(std::vector<double> time_vect,
96 {
time_[1] = minutes ;}
98 {
time_[2] = std::floor(seconds) ;
131 std::vector<double>
time_ ;
void SetHours(const double &hours)
void SetSeconds(const double &seconds)
void init_members(void)
Initialize data members.
void copy_members(const CETime &other)
Copy data members from another object of the same type.
static double UTC(const double &jd)
Get the current UTC time.
static void UTC2LOCALTIME()
double Hour(void) const
Return the Hour associated with this time object.
static std::vector< double > TimeDbl2Vect(const double &time)
Convert a time formatted as HHMMSS.SS into a vector.
void SetTime_LOCALTIME(std::vector< double > time)
Set the time from a vector representing local observer time.
static std::vector< double > UTC_vect(const double &jd)
Get the UTC time of a given julian date as a vector.
CETime & operator=(const CETime &other)
Copy assignment operator.
void SetTime_GAST(std::vector< double > time)
Set the time from a vector representing Greenwich Apparent Sidereal Time.
double Sec(void) const
Return the Second associated with this time object.
void SetMinutes(const double &minutes)
void SetTime(const double &time, CETimeType time_format=CETimeType::UTC)
Set time from double of the form HHMMSS.SS and a specified time format.
static double TimeSec2Time(const double &seconds)
Convert number of seconds since midnight to HHMMSS.S formatted double.
virtual ~CETime()
Destructor.
static double CurrentUTC()
Get the current UTC time as seconds since midnight.
CETime()
Default constructor.
void free_members(void)
Deallocate data members if necessary.
double Min(void) const
Return the Minute associated with this time object.
static double SystemUTCOffset_hrs()
static double TimeVect2Dbl(std::vector< double > time)
Convert a time formatted as HHMMSS.SS into a vector.
void SetTime_UTC(std::vector< double > time)
Set the time from a vector representing UTC time.
static std::vector< double > TimeSec2Vect(const double &seconds)
Convert number of seconds since midnight to HHMMSS.S formatted double.
void SetTime_LST(std::vector< double > time)
Set the time from a vector representing Local Sidereal Time.
static std::vector< double > CurrentUTC_vect()
Get the current UTC time as a vector.
std::vector< double > time_