You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem seem to be here:
METAR.prototype.parseDate = function() {
this.next();
var d = new Date();
d.setUTCDate(asInt(this.current.slice(0, 2)));
d.setUTCHours(asInt(this.current.slice(2, 4)));
d.setUTCMinutes(asInt(this.current.slice(4, 6)));
this.result.time = d;
};
Also, I'm not sure if the METAR timezone is being taken into account. In this example SBSP is the São Paulo–Congonhas Airport which is in GMT-3.
The text was updated successfully, but these errors were encountered:
If you pass the exact sam METAR a couple of time, the resulting object will have a different "time" attribute each time:
https://skydivejkl.github.io/metar.js/#SBSP%20210000Z%2014006KT%209999%20-RA%20BKN007%20OVC013%2017/16%20Q1023
SBSP 210000Z 14006KT 9999 -RA BKN007 OVC013 17/16 Q1023
1st call: 2022-03-21T00:00:01.762Z
2ns call: 2022-03-21T00:00:34.040Z
3rd call: 2022-03-21T00:00:50.418Z
The problem seem to be here:
METAR.prototype.parseDate = function() {
this.next();
var d = new Date();
d.setUTCDate(asInt(this.current.slice(0, 2)));
d.setUTCHours(asInt(this.current.slice(2, 4)));
d.setUTCMinutes(asInt(this.current.slice(4, 6)));
this.result.time = d;
};
Also, I'm not sure if the METAR timezone is being taken into account. In this example SBSP is the São Paulo–Congonhas Airport which is in GMT-3.
The text was updated successfully, but these errors were encountered: