From 207c7ab1e024f4c4886a47b95ca3c5f5aa19ca9d Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 28 Jan 2005 15:23:26 +0000 Subject: [PATCH] MSVC fix. --- simgear/environment/metar.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/simgear/environment/metar.cxx b/simgear/environment/metar.cxx index 09ccbb7a..8966b771 100644 --- a/simgear/environment/metar.cxx +++ b/simgear/environment/metar.cxx @@ -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; } -- 2.39.5