2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 Internal arossstdc function to get current GMT offset
7 #include <proto/exec.h>
8 #include <proto/locale.h>
9 #include <exec/execbase.h>
11 /*****************************************************************************
16 int __arosc_gmtoffset (
26 The offset to GMT in minutes
29 Will return 0 when locale.library is not loaded into memory yet.
38 Will always query the current locale through locale.library to
41 ******************************************************************************/
43 static struct LocaleBase
*LocaleBase
= NULL
;
51 /* Only open locale.library if it does not have to be loaded from disk */
53 found
= FindName(&SysBase
->LibList
, "locale.library");
57 LocaleBase
= (struct LocaleBase
*)OpenLibrary("locale.library", 0);
60 if (LocaleBase
&& (loc
= OpenLocale(NULL
)))
62 gmtoffset
= (int)loc
->loc_GMTOffset
;