mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
[traffic] Add IsoTime::IsPast()
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -138,6 +138,12 @@ IsoTime::IsoTime(std::tm tm)
|
||||
: m_tm(tm)
|
||||
{}
|
||||
|
||||
bool IsoTime::IsPast()
|
||||
{
|
||||
std::time_t t_now = std::time(nullptr);
|
||||
std::time_t t_tm = timegm(&m_tm);
|
||||
return t_tm < t_now;
|
||||
}
|
||||
|
||||
bool operator< (IsoTime lhs, IsoTime rhs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user