mktime [C++ Reference]
Keywords: c,date,mktime
Date: 2008-12-14T17:00:44-0800

[[mktime]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- fr
- it
- jp
- pl
- ru
- tr

## mktime

Syntax:

        #include <ctime>
        time_t mktime( struct tm *time );

The mktime function converts the local time in `time` to calendar time, and returns it.

The elements `tm_wday` and `tm_yday` of the struct `time` are recalculated and reset based on the other elements of the struct.

If there is an error, -1 is returned and tm_yday and tm_wday remain unchanged.

Related Topics: asctime, ctime, gmtime, time

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •