Difference between revisions of "c/chrono/localtime"
From cppreference.com
m (r2.7.3) (Robot: Adding de, es, fr, it, ja, pt, ru, zh) |
m (Shorten template names. Use {{lc}} where appropriate.) |
||
Line 8: | Line 8: | ||
===Parameters=== | ===Parameters=== | ||
− | {{ | + | {{par begin}} |
− | {{ | + | {{par | time | pointer to a {{tt|time_t}} object to convert}} |
− | {{ | + | {{par end}} |
===Return value=== | ===Return value=== | ||
− | pointer to a static internal {{c|tm}} object on success, or {{ | + | pointer to a static internal {{c|tm}} object on success, or {{lc|NULL}} otherwise. The structure may be shared between {{c|gmtime}}, {{c|localtime}}, and {{c|ctime}}, and may be overwritten on each invocation. |
===Notes=== | ===Notes=== | ||
This function may not be thread-safe. | This function may not be thread-safe. | ||
− | POSIX requires that this function sets {{ | + | POSIX requires that this function sets {{lc|errno}} to {{lc|EOVERFLOW}} if it fails because the argument is too large. |
===Example=== | ===Example=== | ||
Line 29: | Line 29: | ||
===See also=== | ===See also=== | ||
− | {{ | + | {{dsc begin}} |
− | {{ | + | {{dsc inc | c/chrono/dcl list gmtime}} |
− | {{ | + | {{dsc see cpp | cpp/chrono/c/localtime}} |
− | {{ | + | {{dsc end}} |
[[de:c/chrono/localtime]] | [[de:c/chrono/localtime]] |
Revision as of 17:28, 31 May 2013
Defined in header <time.h>
|
||
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
This section is incomplete Reason: no example |
See also
C++ documentation for localtime
|