Fix: 64-bit compatibility
[AROS.git] / compiler / stdc / localtime.c
bloba923e8a5e41279b4dab0635997c1432924e752a7
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Convert a time into a string.
6 */
8 #include "__stdc_intbase.h"
10 /*****************************************************************************
12 NAME */
13 #include <time.h>
15 struct tm * localtime (
17 /* SYNOPSIS */
18 const time_t * tt)
20 /* FUNCTION
21 Splits the system time in seconds into a structure.
23 See localtime_r() for details.
25 INPUTS
26 tt - A time in seconds from the 1. Jan 1970
28 RESULT
29 A statically allocated buffer with the broken up time. Note that
30 the contents of the buffer might get lost with the call of any of
31 the date and time functions.
33 NOTES
34 Resulting tm struct is buffered per stdc.library and shared
35 with gmtime().
38 EXAMPLE
39 time_t tt;
40 struct tm * tm;
42 // Get time
43 time (&tt);
45 // Break time up
46 tm = localtime (&tt);
48 BUGS
50 SEE ALSO
51 time(), ctime(), asctime(), gmtime()
53 INTERNALS
55 ******************************************************************************/
57 struct StdCIntBase *StdCBase = (struct StdCIntBase *)__aros_getbase_StdCBase();
59 return localtime_r (tt, &StdCBase->tmbuffer);
60 } /* localtime */