FireBirdLib - Topfield TMS PVR TAP Programming Library
GetCurrentTimeZone.c
Go to the documentation of this file.
1#include "FBLib_time.h"
2
3bool GetCurrentTimeZone(short *TZOffset, bool *DST)
4{
6
7 //TZOffset receives the offset in minutes in the standard time zone
8 //DST is set to TRUE if the Toppy is currently in DST mode
9
10 tFlashTimeInfo FlashTimeInfo;
11 bool ret;
12
13 ret = FALSE;
14 if(FlashTimeGetInfo(&FlashTimeInfo))
15 {
16 if(TZOffset)
17 {
18 *TZOffset = FlashTimeInfo.UTCOffset;
19 if(FlashTimeInfo.DSTActive) *TZOffset = AddTime(*TZOffset, -60);
20 }
21
22 if(DST) *DST = FlashTimeInfo.DSTActive;
23
24 ret = TRUE;
25 }
26
27 TRACEEXIT();
28 return ret;
29}
bool FlashTimeGetInfo(tFlashTimeInfo *TimeInfo)
bool GetCurrentTimeZone(short *TZOffset, bool *DST)
dword AddTime(dword pvrDate, int addMinutes)
Definition: AddTime.c:3
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243