summaryrefslogtreecommitdiffstats
path: root/lib/libUPnP/Neptune/Source/System/Win32/NptWin32Time.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libUPnP/Neptune/Source/System/Win32/NptWin32Time.cpp')
-rwxr-xr-xlib/libUPnP/Neptune/Source/System/Win32/NptWin32Time.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/libUPnP/Neptune/Source/System/Win32/NptWin32Time.cpp b/lib/libUPnP/Neptune/Source/System/Win32/NptWin32Time.cpp
new file mode 100755
index 0000000..637b48c
--- /dev/null
+++ b/lib/libUPnP/Neptune/Source/System/Win32/NptWin32Time.cpp
@@ -0,0 +1,33 @@
+/*****************************************************************
+|
+| Neptune - Time: Win32 Implementation
+|
+| (c) 2002-2009 Gilles Boccon-Gibod
+| Author: Gilles Boccon-Gibod (bok@bok.net)
+|
+****************************************************************/
+
+/*----------------------------------------------------------------------
+| includes
++---------------------------------------------------------------------*/
+#include <windows.h>
+
+#include "NptTime.h"
+#include "NptResults.h"
+
+/*----------------------------------------------------------------------
+| logging
++---------------------------------------------------------------------*/
+//NPT_SET_LOCAL_LOGGER("neptune.system.win32.time")
+
+/*----------------------------------------------------------------------
+| NPT_DateTime::GetTimeZone
++---------------------------------------------------------------------*/
+NPT_Int32
+NPT_DateTime::GetLocalTimeZone()
+{
+ TIME_ZONE_INFORMATION tz_info;
+ DWORD result = GetTimeZoneInformation(&tz_info);
+ if (result == TIME_ZONE_ID_INVALID) return 0;
+ return -tz_info.Bias;
+}