test/sdi: make use of sfdc generated stubs file.
[AROS.git] / compiler / stdc / __stdc_gmtoffset.c
blobf28a4b2e1d5572aee385940d6140705db7031f66
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
5 Internal arossstdc function to get current GMT offset
6 */
7 #include <proto/exec.h>
8 #include <proto/locale.h>
9 #include <exec/execbase.h>
11 #include "__optionallibs.h"
13 /*****************************************************************************
15 NAME */
16 #include <time.h>
18 int __stdc_gmtoffset (
20 /* SYNOPSIS */
21 void)
23 /* FUNCTION
25 INPUTS
27 RESULT
28 The offset to GMT in minutes
30 NOTES
31 Will return 0 when locale.library is not loaded into memory yet.
33 EXAMPLE
35 BUGS
37 SEE ALSO
39 INTERNALS
40 Will always query the current locale through locale.library to
41 get the GMT offset.
43 ******************************************************************************/
45 struct Locale *loc;
46 int gmtoffset = 0;
48 if (__locale_available() && (loc = OpenLocale(NULL)))
50 gmtoffset = (int)loc->loc_GMTOffset;
51 CloseLocale(loc);
54 return gmtoffset;