9 #ifndef MRPT_SYSTEM_DATETIME_H 10 #define MRPT_SYSTEM_DATETIME_H 17 #define INVALID_TIMESTAMP (0) uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
mrpt::system::TTimeStamp BASE_IMPEXP time_tToTimestamp(const double &t)
Transform from standard "time_t" (actually a double number, it can contain fractions of seconds) to T...
mrpt::system::TTimeStamp BASE_IMPEXP secondsToTimestamp(const double &nSeconds)
Transform a time interval (in seconds) into TTimeStamp (e.g.
std::string BASE_IMPEXP intervalFormat(const double seconds)
This function implements time interval formatting: Given a time in seconds, it will return a string d...
EIGEN_STRONG_INLINE const AdjointReturnType t() const
Transpose.
std::string BASE_IMPEXP dateTimeLocalToString(const mrpt::system::TTimeStamp &t)
Convert a timestamp into this textual form (in local time): YEAR/MONTH/DAY,HH:MM:SS.MMM.
uint8_t day_of_week
Seconds (0.0000-59.9999)
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
std::string BASE_IMPEXP formatTimeInterval(const double &timeSeconds)
Returns a formated string with the given time difference (passed as the number of seconds)...
double BASE_IMPEXP extractDayTimeFromTimestamp(const mrpt::system::TTimeStamp &t)
Returns the number of seconds ellapsed from midnight in the given timestamp.
mrpt::system::TTimeStamp BASE_IMPEXP getCurrentLocalTime()
Returns the current (local) time.
double timestampToDouble(const mrpt::system::TTimeStamp &t)
Transform from TTimeStamp to standard "time_t" (actually a double number, it can contain fractions of...
int daylight_saving
Day of week (1:Sunday, 7:Saturday)
std::string BASE_IMPEXP timeToString(const mrpt::system::TTimeStamp &t)
Convert a timestamp into this textual form (UTC): HH:MM:SS.MMMMMM.
The parts of a date/time (it's like the standard 'tm' but with fractions of seconds).
mrpt::system::TTimeStamp BASE_IMPEXP buildTimestampFromPartsLocalTime(const mrpt::system::TTimeParts &p)
Builds a timestamp from the parts (Parts are in local time)
mrpt::system::TTimeStamp BASE_IMPEXP getCurrentTime()
Returns the current (UTC) system time.
std::string BASE_IMPEXP dateTimeToString(const mrpt::system::TTimeStamp &t)
Convert a timestamp into this textual form (UTC time): YEAR/MONTH/DAY,HH:MM:SS.MMM.
mrpt::system::TTimeStamp BASE_IMPEXP buildTimestampFromParts(const mrpt::system::TTimeParts &p)
Builds a timestamp from the parts (Parts are in UTC)
std::string BASE_IMPEXP timeLocalToString(const mrpt::system::TTimeStamp &t, unsigned int secondFractionDigits=6)
Convert a timestamp into this textual form (in local time): HH:MM:SS.MMMMMM.
std::string BASE_IMPEXP dateToString(const mrpt::system::TTimeStamp &t)
Convert a timestamp into this textual form: YEAR/MONTH/DAY.
double second
Minute (0-59)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
uint8_t minute
Hour (0-23)
double BASE_IMPEXP timeDifference(const mrpt::system::TTimeStamp &t_first, const mrpt::system::TTimeStamp &t_later)
Retuns the time difference from t1 to t2 (positive if t2 is posterior to t1), in seconds.
void BASE_IMPEXP timestampToParts(TTimeStamp t, TTimeParts &p, bool localTime=false)
Gets the individual parts of a date/time (days, hours, minutes, seconds) - UTC time or local time...
double BASE_IMPEXP timestampTotime_t(const mrpt::system::TTimeStamp &t)
Transform from TTimeStamp to standard "time_t" (actually a double number, it can contain fractions of...