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:
parent
47e802e674
commit
580a7f07dd
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue