Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/chrono/c/mktime"

From cppreference.com
< cpp‎ | chrono‎ | c
m (Text replace - "{{returns}}" to "===Return value===")
m (Text replace - "{{example}}" to "===Example===")
Line 21: Line 21:
  
 
<!-- ======== -->
 
<!-- ======== -->
{{example}}
+
===Example===
 
{{example cpp
 
{{example cpp
 
  |
 
  |

Revision as of 17:57, 2 August 2011

Template:cpp/chrono/c/sidebar

Defined in header <ctime>
time_t mktime( struct tm *time );

Converts local calendar time to a time since epoch as a time_t object.

If successful, recalculates day of the week(tm_wday and day of the year (tm_yday) fields in time.

Parameters

tm - pointer to a tm object specifying local calendar time to convert

Return value

time since epoch as a time_t object on success or Template:cpp otherwise.

Example

Template:example cpp