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 * <<gmtime>>---convert time to UTC traditional form
21 * struct tm *gmtime(const time_t *<[clock]>);
22 * struct tm *gmtime_r(const time_t *<[clock]>, struct tm *<[res]>);
25 * struct tm *gmtime(<[clock]>)
26 * const time_t *<[clock]>;
27 * struct tm *gmtime_r(<[clock]>, <[res]>)
28 * const time_t *<[clock]>;
30 * <<gmtime>> assumes the time at <[clock]> represents a local time.
31 * <<gmtime>> converts it to UTC (Universal Coordinated Time, also known in some
32 * countries as GMT, Greenwich Mean time), then converts the
33 * representation from the arithmetic representation to
34 * the traditional representation defined by <<struct tm>>.
35 * <<gmtime>> constructs the traditional time representation in static
36 * storage; each call to <<gmtime>> or <<localtime>> will overwrite the
37 * information generated by previous calls to either function.
39 * A pointer to the traditional time representation (<<struct tm>>).
41 * ANSI C requires <<gmtime>>.
42 * <<gmtime>> requires no supporting OS subroutines.
49 #include <sys/reent.h>
55 Convert time_t value to tm structure as UTC time.
56 Converts timer to tm structure adjusting to
57 UTC (formerly known as GMT) timezone.
58 @return A pointer to a tm structure.
59 This structure is statically allocated and shared by gmtime,
60 localtime and ctime functions.
61 Each time one of these functions is called the content of
62 the structure is overwritten.
63 @param tim_p pointer to a time_t value,
64 usually returned by time function.
67 gmtime (const time_t * tim_p)
69 return gmtime_r (tim_p, &(_REENT->_struct_tm));