Build Envy24 driver.
[AROS.git] / compiler / stdc / gmtime.c
blob935f013bef18dd9a52536582fce429e98a750d3e
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Convert a time into UTC.
6 */
8 #include "__stdc_intbase.h"
10 /*****************************************************************************
12 NAME */
13 #include <time.h>
15 struct tm * gmtime (
17 /* SYNOPSIS */
18 const time_t * tt)
20 /* FUNCTION
21 The gmtime() function converts the calendar time tt to
22 broken-down time representation, expressed in Coordinated Universal
23 Time (UTC).
25 See gmtime_r() for details.
27 INPUTS
28 tt - The time to convert
30 RESULT
31 A statically allocated buffer with the broken down time in Coordinated
32 Universal Time (UTC). Note that the contents of the buffer might get
33 lost with the call of any of the date and time functions.
35 NOTES
36 Resulting tm struct is buffered per stdc.library and shared
37 with localtime().
39 EXAMPLE
40 time_t tt;
41 struct tm * tm;
43 // Get the time
44 time (&tt);
46 // and convert it
47 tm = gmtime (&tt);
49 BUGS
51 SEE ALSO
52 time(), ctime(), asctime(), localtime()
54 INTERNALS
56 ******************************************************************************/
58 struct StdCIntBase *StdCBase = (struct StdCIntBase *)__aros_getbase_StdCBase();
59 extern struct tm * gmtime_r (const time_t * tt, struct tm * tm);
61 return gmtime_r(tt, &StdCBase->tmbuffer);
62 } /* gmtime */