Timezone example
#include <iostream>
{
std::cout <<
"Time.name() = " << time_zone.
name() << std::endl;
std::cout <<
"Time.offset() = " << time_zone.
offset().
seconds() << std::endl;
std::cout <<
"Time.daylight() = " << time_zone.
daylight().
seconds() << std::endl;
std::cout << std::endl;
}
int main(int argc, char** argv)
{
std::cout << "UTC timezone:" << std::endl;
std::cout << "Local timezone:" << std::endl;
return 0;
}
int64_t seconds() const noexcept
Get total seconds of the current timespan.
static Timezone utc()
Get the UTC timezone (Greenwich Mean Time)
const std::string & name() const noexcept
Get timezone name.
static Timezone local()
Get the local timezone.
const Timespan & daylight() const noexcept
Get timezone daylight saving time offset.
const Timespan & offset() const noexcept
Get timezone offset.