arch/m68k-amiga: Define the gcc symbol 'start' instead of using .bss
[AROS.git] / compiler / clib / localtime.c
blobd167f2137b4844409077774e0677c521da1a5bfa
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
5 Convert a time into a string.
6 */
8 extern long __gmtoffset;
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 This function must not be used in a shared library or
35 in a threaded application. Use localtime_r() instead.
37 EXAMPLE
38 time_t tt;
39 struct tm * tm;
41 // Get time
42 time (&tt);
44 // Break time up
45 tm = localtime (&tt);
47 BUGS
49 SEE ALSO
50 time(), ctime(), asctime(), gmtime()
52 INTERNALS
54 ******************************************************************************/
56 static struct tm tm;
58 return localtime_r (tt, &tm);
59 } /* localtime */