]> git.mxchange.org Git - simgear.git/commitdiff
MSVC fix.
authorehofman <ehofman>
Fri, 28 Jan 2005 15:23:26 +0000 (15:23 +0000)
committerehofman <ehofman>
Fri, 28 Jan 2005 15:23:26 +0000 (15:23 +0000)
simgear/environment/metar.cxx

index 09ccbb7ab4881b6a51ae78602cb3976687c07c5a..8966b77179f921a0e51d2750fc9c2aceeafc1845 100644 (file)
@@ -156,7 +156,11 @@ void SGMetar::useCurrentDate()
 {
        struct tm now;
        time_t now_sec = time(0);
+#ifdef _MSC_VER
+       now = *gmtime(&now_sec);
+#else
        gmtime_r(&now_sec, &now);
+#endif
        _year = now.tm_year + 1900;
        _month = now.tm_mon + 1;
 }