define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / compiler / clib / gmtime.c
blob9797ba096bdde97f2274bfc76238271f2787b479
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Convert a time into UTC.
6 */
8 /*****************************************************************************
10 NAME */
11 #include <time.h>
13 struct tm * gmtime (
15 /* SYNOPSIS */
16 const time_t * tt)
18 /* FUNCTION
19 The gmtime() function converts the calendar time tt to
20 broken-down time representation, expressed in Coordinated Universal
21 Time (UTC).
23 See gmtime_r() for details.
25 INPUTS
26 tt - The time to convert
28 RESULT
29 A statically allocated buffer with the broken down time in Coordinated
30 Universal Time (UTC). Note that the contents of the buffer might get
31 lost with the call of any of the date and time functions.
33 NOTES
34 This function must not be used in a shared library or
35 in a threaded application. Use gmtime_r() instead.
37 EXAMPLE
38 time_t tt;
39 struct tm * tm;
41 // Get the time
42 time (&tt);
44 // and convert it
45 tm = gmtime (&tt);
47 BUGS
49 SEE ALSO
50 time(), ctime(), asctime(), localtime()
52 INTERNALS
54 ******************************************************************************/
56 static struct tm tm;
58 return gmtime_r(tt, &tm);
59 } /* gmtime */