Namespaces
Variants
Views
Actions

localtime

From cppreference.com
< c‎ | chrono
Revision as of 21:35, 31 May 2013 by P12bot (Talk | contribs)

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

Converts given time since epoch as time_t 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 tm object on success, or NULL otherwise. The structure may be shared between gmtime, localtime, and ctime, and may be overwritten on each invocation.

Notes

This function may not be thread-safe.

POSIX requires that this function sets errno to EOVERFLOW if it fails because the argument is too large.

Example

See also

converts time since epoch to calendar time expressed as Coordinated Universal Time (UTC)
(function) [edit]
C++ documentation for localtime