From b13dd05aca0c62af14858ba4aa88af1ce23caad8 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 16 Mar 2017 21:26:43 +0000 Subject: [PATCH] Fix bug on Windows, time() is UTC there also. This renders sgGMTime obsolete, it will go away shortly. Thanks to Ron H for help tracking this down and Richard Harrison for his knowledge of Windows APIs in confirming the issue. --- src/Environment/fgmetar.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Environment/fgmetar.cxx b/src/Environment/fgmetar.cxx index 161252d5a..8495c17c6 100644 --- a/src/Environment/fgmetar.cxx +++ b/src/Environment/fgmetar.cxx @@ -160,7 +160,7 @@ FGMetar::FGMetar(const string& icao) : long FGMetar::getAge_min() const { - time_t now = _x_proxy ? _rq_time : sgGMTime(); + time_t now = _x_proxy ? _rq_time : time(nullptr); return (now - _time) / 60; }