A simple time-of-day (hh/mm/ss) class. More...
#include <gtime.h>
Classes | |
class | LocalTime |
An overload discriminator class for Time constructors. More... | |
Public Member Functions | |
Time () | |
Constructor, using UTC, for now. More... | |
Time (const G::DateTime::BrokenDownTime &tm) | |
Constructor for the given broken-down time. More... | |
Time (G::DateTime::EpochTime t) | |
Constructor, using UTC, for the given epoch time. More... | |
Time (G::DateTime::EpochTime t, const LocalTime &) | |
Constructor, using the local timezone, for the given epoch time. More... | |
Time (const LocalTime &) | |
Localtime constructor for now. More... | |
int | hours () const |
Returns the hours (0 <= h < 24). More... | |
int | minutes () const |
Returns the minutes (0 <= m < 60). More... | |
int | seconds () const |
Returns the seconds (0 <= s <= 61 [sic]). More... | |
std::string | hhmmss (const char *sep=NULL) const |
Returns a hhmmss string. More... | |
std::string | hhmm (const char *sep=NULL) const |
Returns a hhmm string. More... | |
std::string | ss () const |
Returns the seconds as a two-digit decimal seconds. More... | |
A simple time-of-day (hh/mm/ss) class.
G::Time::Time | ( | ) |
Constructor, using UTC, for now.
Definition at line 33 of file gtime.cpp.
References G::DateTime::now(), and G::DateTime::utc().
|
explicit |
|
explicit |
Constructor, using UTC, for the given epoch time.
Definition at line 41 of file gtime.cpp.
References G::DateTime::utc().
G::Time::Time | ( | G::DateTime::EpochTime | t, |
const LocalTime & | |||
) |
Constructor, using the local timezone, for the given epoch time.
Definition at line 57 of file gtime.cpp.
References G::DateTime::local().
|
explicit |
Localtime constructor for now.
Definition at line 49 of file gtime.cpp.
References G::DateTime::local(), and G::DateTime::now().
std::string G::Time::hhmm | ( | const char * | sep = NULL | ) | const |
std::string G::Time::hhmmss | ( | const char * | sep = NULL | ) | const |
Returns a hhmmss string.
Definition at line 80 of file gtime.cpp.
Referenced by GSmtp::ServerProtocolText::receivedLine().
int G::Time::hours | ( | ) | const |
int G::Time::minutes | ( | ) | const |
int G::Time::seconds | ( | ) | const |
std::string G::Time::ss | ( | ) | const |