]> git.tdb.fi Git - libs/core.git/commitdiff
Fix some win32 compile errors
authorMikko Rasa <tdb@tdb.fi>
Sun, 8 Mar 2009 15:41:38 +0000 (15:41 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Mar 2009 15:41:38 +0000 (15:41 +0000)
source/time/timezone.cpp

index fd2487b6475600412ca42700aa59cf36d58b7299..541514f8b8272c1573b4a361c85675a3cf92ce09 100644 (file)
@@ -8,7 +8,12 @@ Distributed under the LGPL
 #include <cstdlib>
 #include <sstream>
 #include <iomanip>
+#ifdef WIN32
+#include <windows.h>
+#else
 #include <time.h>
+#endif
+#include <msp/core/except.h>
 #include "timezone.h"
 #include "units.h"
 
@@ -24,7 +29,7 @@ TimeZone get_local_timezone()
        TIME_ZONE_INFORMATION tzinfo;
        DWORD dst=GetTimeZoneInformation(&tzinfo);
        if(dst==TIME_ZONE_ID_INVALID)
-               throw SystemError("Failed to get time zone information", GetLastError());
+               throw Msp::SystemError("Failed to get time zone information", GetLastError());
 
        int offset=tzinfo.Bias;
        if(dst==TIME_ZONE_ID_STANDARD)