Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TAF - Different time formats #22

Closed
pejeio opened this issue May 5, 2020 · 1 comment
Closed

TAF - Different time formats #22

pejeio opened this issue May 5, 2020 · 1 comment

Comments

@pejeio
Copy link

pejeio commented May 5, 2020

Expectation

start_time.dt and end_time.dt is always formatted in the correct ISO 8601 format

Result

The format differs from location to location.

EBBR

https://avwx.rest/api/taf/EBBR

Raw TAF: EBBR 050501Z 0506/0612 06011KT CAVOK

"start_time": {
  "repr": "0506",
  "dt": "2020-05-05T06:00:00+00:00Z"
}

ELLX

https://avwx.rest/api/taf/ELLX

Raw TAF: ELLX 050500Z 0506/0612 04010KT CAVOK

"start_time": {
  "repr": "0506",
  "dt": "2020-05-05T06:00:00Z"
}

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".

Schermafbeelding 2020-05-05 om 08 20 11

@devdupont
Copy link
Collaborator

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.

avwx-rest/avwx-api-core@779cffd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants