|
| | UtcTime () |
| | Initialize UTC time with a current value.
|
| |
| | UtcTime (const Timestamp ×tamp) |
| | Initialize UTC time with a given timestamp.
|
| |
| template<class Clock , class Duration > |
| | UtcTime (const std::chrono::time_point< Clock, Duration > &time_point) |
| | Initialize UTC time with a given std::chrono time point.
|
| |
| | UtcTime (const Time &time) |
| | Initialize UTC time with another time value.
|
| |
| | UtcTime (const LocalTime &time) |
| | Initialize UTC time with another local time value.
|
| |
| | Time () noexcept |
| | Initialize time with an epoch time.
|
| |
| | Time (int year, int month, int day, int hour=0, int minute=0, int second=0, int millisecond=0, int microsecond=0, int nanosecond=0) |
| | Initialize time with a given date & time components (year, month, day, hour, minute, second, etc.)
|
| |
| | Time (const Time &) noexcept=default |
| |
| | Time (Time &&) noexcept=default |
| |
| | Time (const Timestamp ×tamp) |
| | Protected initialize time with a timestamp.
|
| |
| std::chrono::time_point< std::chrono::system_clock > | chrono () const |
| | Convert date & time to the std::chrono time point.
|
| |
| | Time () noexcept |
| | Initialize time with an epoch time.
|
| |
| | Time (int year, int month, int day, int hour=0, int minute=0, int second=0, int millisecond=0, int microsecond=0, int nanosecond=0) |
| | Initialize time with a given date & time components (year, month, day, hour, minute, second, etc.)
|
| |
| | Time (const Time &) noexcept=default |
| |
| | Time (Time &&) noexcept=default |
| |
| | ~Time () noexcept=default |
| |
| Time & | operator= (const Timestamp ×tamp) |
| |
| Time & | operator= (const Time &) noexcept=default |
| |
| Time & | operator= (Time &&) noexcept=default |
| |
| Time & | operator+= (const Timespan &offset) |
| |
| Time & | operator-= (const Timespan &offset) |
| |
| std::chrono::time_point< std::chrono::system_clock > | chrono () const |
| | Convert date & time to the std::chrono time point.
|
| |
| int | year () const noexcept |
| | Get year value (1970-2038 for 32-bit or 1970-3000 for 64-bit)
|
| |
| int | month () const noexcept |
| | Get month value (1-12)
|
| |
| Weekday | weekday () const noexcept |
| | Get weekday.
|
| |
| int | day () const noexcept |
| | Get day value (1-31)
|
| |
| int | hour () const noexcept |
| | Get hour value (0-23)
|
| |
| int | minute () const noexcept |
| | Get minute value (0-59)
|
| |
| int | second () const noexcept |
| | Get second value (0-59)
|
| |
| int | millisecond () const noexcept |
| | Get millisecond value (0-999)
|
| |
| int | microsecond () const noexcept |
| | Get microsecond value (0-999)
|
| |
| int | nanosecond () const noexcept |
| | Get nanosecond value (0-999)
|
| |
| UtcTimestamp | utcstamp () const |
| | Get UTC timestamp from the current date & time value.
|
| |
| LocalTimestamp | localstamp () const |
| | Get local timestamp from the current date & time value.
|
| |
| void | swap (Time &time) noexcept |
| | Swap two instances.
|
| |
UTC time.
- Examples
- time_time.cpp.
Definition at line 208 of file time.h.