1
0
Fork 0

Fix METAR-download bug on Windows.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1207

Use the new (in SimGear) sgGMTime helper when comparing METAR age.
This prevents users in time-zones 4 or more hours ahead of GMT from
being unable to use METAR reports.
This commit is contained in:
James Turner 2014-01-01 21:05:29 +00:00
parent 47e802e674
commit 580a7f07dd

View file

@ -38,6 +38,8 @@
#include <simgear/math/sg_random.h>
#include <simgear/timing/sg_time.hxx>
#include <simgear/timing/lowleveltime.h>
#include <Main/fg_props.hxx>
#include "fgmetar.hxx"
@ -158,7 +160,7 @@ FGMetar::FGMetar(const string& icao) :
long FGMetar::getAge_min() const
{
time_t now = _x_proxy ? _rq_time : time(0);
time_t now = _x_proxy ? _rq_time : sgGMTime();
return (now - _time) / 60;
}