/** @file
* @brief time related functions.
*
- * @copyright Copyright © 2001-2008 by Intra2net AG
+ * @copyright Copyright © 2001-2018 by Intra2net AG
*/
#ifndef __TIMEFUNC_HXX
std::string make_nice_time(int seconds);
std::string format_full_time(time_t seconds);
std::string format_date(time_t seconds);
+std::string format_iso8601(const struct tm &tm, const bool date=true,
+ const bool time=true, const bool tz=true);
+std::string format_iso8601(time_t t, const bool utc=true,
+ const bool date=true, const bool time=true,
+ const bool tz=true);
+inline std::string format_iso8601(const struct timespec ts, const bool utc=true,
+ const bool date=true, const bool time=true,
+ const bool tz=true)
+{ return format_iso8601 (ts.tv_sec, utc, date, time, tz); }
+
void seconds_to_hour_minute(int seconds, int *hour, int *minute);
void split_daysec(int daysec, int *outhours=NULL, int *outminutes=NULL, int *outseconds=NULL);
std::string output_hour_minute(int hour, int minute, bool h_for_00=true, int seconds=0);