std::tm (3) - Linux Manuals

std::tm: std::tm

NAME

std::tm - std::tm

Synopsis


Defined in header <ctime>
struct tm;


Structure holding a calendar date and time broken down into its components.

Member objects


             seconds after the minute – [0, 61](until C++11) / [0, 60] (since C++11)[note_1]
int tm_sec (public member object)
             minutes after the hour – [0, 59]
int tm_min (public member object)
             hours since midnight – [0, 23]
int tm_hour (public member object)
             day of the month – [1, 31]
int tm_mday (public member object)
             months since January – [0, 11]
int tm_mon (public member object)
             years since 1900
int tm_year (public member object)
             days since Sunday – [0, 6]
int tm_wday (public member object)
             days since January 1 – [0, 365]
int tm_yday (public member object)
             Daylight Saving Time flag. The value is positive if DST is in effect, zero if not and negative if no information is available
int tm_isdst (public member object)

Notes


  1. ↑ Range allows for a positive leap second. Two leap seconds in the same minute are not allowed (the range 0..61 was a defect introduced in C89 and corrected in C99)

See also


          converts time since epoch to calendar time expressed as local time
localtime (function)
          converts time since epoch to calendar time expressed as Universal Coordinated Time
gmtime (function)