Closed pejeio closed 4 years ago
I will need to add some more tests in the core library to figure out what is causing some date time objects to be created without a timezone, but I've made a change to the JSON formatter that should fix this problem's symptom for the end-user.
https://github.com/avwx-rest/avwx-api-core/commit/779cffd4826e43d12c0bf1e0fb43dca5d43c361a
Expectation
start_time.dt
andend_time.dt
is always formatted in the correct ISO 8601 formatResult
The format differs from location to location.
EBBR
https://avwx.rest/api/taf/EBBR
Raw TAF:
EBBR 050501Z 0506/0612 06011KT CAVOK
ELLX
https://avwx.rest/api/taf/ELLX
Raw TAF:
ELLX 050500Z 0506/0612 04010KT CAVOK
It becomes especially difficult when this time has to be parsed for different weather stations. Tools like Moment.js fail.
Furthermore, the notation for EBBR does not appear to be correct. The letter "Z" should never be added when using "+00:00".