src/Date.cpp
/*!
    Returns the current GM(Greenwish Mean) date, as reported by the system clock.
*/
Returns the current GM(Greenwish Mean) date, as reported by the system clock.
Returns the current GM ( Greenwish Mean ) date as reported by the system clock .
Date Date::currentGmDate()
{
    std::time_t t = std::time(nullptr);
    std::tm tm;
#if defined(UTILS4CPP_OS_WIN)
    gmtime_s(&tm, &t);
#elif defined(UTILS4CPP_OS_UNIX)
    gmtime_r(&t, &tm);
#else
    tm = *std::gmtime(&t);
#endif
    return Date(tm);
}
Date Date :: currentGmDate ( ) { std :: time_t t = std :: time ( nullptr ) ; std :: tm tm ; #if defined ( UTILS4CPP_OS_WIN ) gmtime_s ( & tm , & t ) ; #elif defined ( UTILS4CPP_OS_UNIX ) gmtime_r ( & t , & tm ) ; #else tm = * std :: gmtime ( & t ) ; #endif return Date ( tm ) ; }
Returns the current GM(Greenwish Mean) date, as reported by the system clock.
Returns the current GM ( Greenwish Mean ) date as reported by the system clock .