revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-mingw32 / battclock / readbattclock.c
blobad1c989729c3ce892c58536f07d502a9a63acb78
1 /*
2 Copyright 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: ReadBattClock() function.
6 Lang: english
7 */
9 #include "battclock_intern.h"
10 #include <proto/battclock.h>
11 #include <proto/exec.h>
12 #include <proto/utility.h>
13 #include <utility/date.h>
15 AROS_LH0(ULONG, ReadBattClock, struct BattClockBase *, BattClockBase, 2, Battclock)
17 AROS_LIBFUNC_INIT
19 SYSTEMTIME tm;
20 struct ClockData date;
22 Forbid();
23 BattClockBase->KernelIFace->GetSystemTime(&tm);
24 Permit();
25 date.year = tm.wYear;
26 date.month = tm.wMonth;
27 date.mday = tm.wDay;
28 date.hour = tm.wHour;
29 date.min = tm.wMinute;
30 date.sec = tm.wSecond;
31 /* Day of week is just informative and can be ignored */
33 return Date2Amiga(&date);
35 AROS_LIBFUNC_EXIT
36 } /* ReadBattClock */