41#ifndef _DWMTIMEUTIL_HH_
42#define _DWMTIMEUTIL_HH_
65 static void GmTime(time_t unixsecs,
struct tm & result);
71 static void LocalTime(time_t unixsecs,
struct tm & result);
79 const struct timeval & rhs,
80 struct timeval & result);
This class is just a collection of time utility functions.
Definition DwmTimeUtil.hh:59
static bool ParseDateTime(const std::string &dateTimeString, struct tm &tm)
Parses dateTimeString and stores the resulting time in tm.
static bool ParseDateTime(const std::string &dateTimeString, time_t &t)
Parses dateTimeString and stores the resulting time in t.
static void LocalTime(time_t unixsecs, struct tm &result)
This is just a convenient wrapper for localtime(time_t *) that stores the result in result.
static bool SubtractTimeval(const struct timeval &lhs, const struct timeval &rhs, struct timeval &result)
Subtracts rhs from lhs and places the result in result.
static void GmTime(time_t unixsecs, struct tm &result)
This is just a convenient wrapper for gmtime(time_t *) that stores the result in result.
static time_t MidnightDaysLater(int daysLater)
Returns the time for midnight (00:00) at the given daysLater.