Implemented GetDaylightFlag.

This commit is contained in:
Rein Klazes 2004-03-03 02:17:58 +00:00 committed by Alexandre Julliard
parent 589e115233
commit 2ce96b45a0
2 changed files with 17 additions and 1 deletions

View File

@ -381,7 +381,7 @@
@ stdcall GetCurrentThreadId()
@ stdcall GetDateFormatA(long long ptr str ptr long)
@ stdcall GetDateFormatW(long long ptr wstr ptr long)
@ stub GetDaylightFlag
@ stdcall GetDaylightFlag()
@ stdcall GetDefaultCommConfigA(str ptr long)
@ stdcall GetDefaultCommConfigW(wstr ptr long)
@ stub GetDefaultSortkeySize

View File

@ -155,6 +155,7 @@ BOOL WINAPI SetSystemTimeAdjustment(
* RETURNS
* Success: TIME_ZONE_ID_STANDARD. tzinfo contains the time zone info.
* Failure: TIME_ZONE_ID_INVALID.
* FIXME: return TIME_ZONE_ID_DAYLIGHT when daylight saving is on.
*/
DWORD WINAPI GetTimeZoneInformation(
LPTIME_ZONE_INFORMATION tzinfo) /* [out] Destination for time zone information */
@ -871,3 +872,18 @@ VOID WINAPI GetSystemTime(LPSYSTEMTIME systime) /* [O] Destination for current t
ft.dwHighDateTime = t.u.HighPart;
FileTimeToSystemTime(&ft, systime);
}
/*********************************************************************
* GetDaylightFlag (KERNEL32.@)
*
* returns TRUE if daylight saving time is in operation
*
* Note: this function is called from the Win98's control applet
* timedate.cpl
*/
BOOL WINAPI GetDaylightFlag(void)
{
time_t t = time(NULL);
struct tm *ptm = localtime( &t);
return ptm->tm_isdst > 0;
}