Namespaces
Variants
Views
Actions

Difference between revisions of "c/chrono/localtime"

From cppreference.com
< c‎ | chrono
m (Text replace - "example cpp" to "example c")
Line 22: Line 22:
  
 
===Example===
 
===Example===
{{example cpp
+
{{example c
 
  |
 
  |
 
  | code=
 
  | code=

Revision as of 15:32, 13 April 2012

Template:c/chrono/sidebar

Defined in header <time.h>
tm* localtime( const time_t *time );

Converts given time since epoch as Template:cpp value into calendar time, expressed in local time.

Contents

Parameters

time - pointer to a time_t object to convert

Return value

pointer to a static internal Template:cpp object on success, or Template:cpp otherwise. The structure may be shared between Template:cpp, Template:cpp, and Template:cpp, and may be overwritten on each invocation.

Notes

This function may not be thread-safe.

POSIX requires that this function sets Template:cpp to Template:cpp if it fails because the argument is too large.

Example

Template:example c

See also

Template:c/chrono/dcl list gmtime