Update contrib.
2 * Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * <<localtime>>---convert time to local representation
21 * struct tm *localtime(time_t *<[clock]>);
22 * struct tm *localtime_r(time_t *<[clock]>, struct tm *<[res]>);
25 * struct tm *localtime(<[clock]>)
27 * struct tm *localtime(<[clock]>, <[res]>)
30 * <<localtime>> converts the time at <[clock]> into local time, then
31 * converts its representation from the arithmetic representation to the
32 * traditional representation defined by <<struct tm>>.
33 * <<localtime>> constructs the traditional time representation in static
34 * storage; each call to <<gmtime>> or <<localtime>> will overwrite the
35 * information generated by previous calls to either function.
36 * <<mktime>> is the inverse of <<localtime>>.
38 * A pointer to the traditional time representation (<<struct tm>>).
40 * ANSI C requires <<localtime>>.
41 * <<localtime>> requires no supporting OS subroutines.
49 #include <sys/reent.h>
54 Convert time_t value to tm structure as local time.
55 Converts timer to tm structure adjusting to the local time zone.
56 @return A pointer to a tm structure.
57 This structure is statically allocated and shared by gmtime,
58 localtime and ctime functions.
59 Each time one of these functions is called the content
60 of the structure is overwritten.
61 @param tim_p pointer to a time_t value,
62 usually returned by time function.
65 localtime (const time_t * tim_p)
67 return localtime_r (tim_p, &(_REENT->_struct_tm));