Namespaces
Variants
Views
Actions

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

From cppreference.com
< cpp‎ | chrono‎ | c
(Created page with "{{cpp/title| mktime}} {{cpp/chrono/c/sidebar}} {{ddcl | header=ctime | time_t mktime( struct tm *time ); }} Converts local calendar time to a time since epoch as a {{rlpt|time_t...")
 
m (Text replace - "{{params}}" to "===Parameters===")
Line 10: Line 10:
  
 
<!-- ======== -->
 
<!-- ======== -->
{{params}}
+
===Parameters===
 
{{param list begin}}
 
{{param list begin}}
 
{{param list item | tm | pointer to a {{rlpt|tm}} object specifying local calendar time to convert}}
 
{{param list item | tm | pointer to a {{rlpt|tm}} object specifying local calendar time to convert}}

Revision as of 17:35, 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

Template:returns

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

Template:example cpp