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

Improper 12-hour clock usage #13

Open
d5xtgr opened this issue Feb 16, 2024 · 1 comment
Open

Improper 12-hour clock usage #13

d5xtgr opened this issue Feb 16, 2024 · 1 comment

Comments

@d5xtgr
Copy link

d5xtgr commented Feb 16, 2024

Air Canada appears to blindly trust the times provided in the B_DATE_* parameters, but expects them to be in 24-hour time, while this tool provides them in 12-hour time. As a result, on the Air Canada review page, a flight that overlaps noon but starts and ends on the same calendar date:

  • is reported to have negative duration
  • is missing any layover that overlaps noon
  • contains incorrect departure time for the leg following such a location
  • lists other PM times as occurring twelve hours earlier, i.e. the corresponding AM time

I compared two itineraries between the same set of cities YYZ-YUL-YHZ, one that completes entirely in the AM and one that provokes the errors above. Here are the overviews on the "Trip Review" page:

compare-overview

Here are the corresponding detail views:

compare-details

I suspect that this would be corrected by changing currentItin.itin[i].seg[j].dep.time to currentItin.itin[i].seg[j].dep.time24 on line 114 of amadeus.js, in parallel with line 71 of the same file. However, I have no idea if there are negative side effects to doing so.

@adamhwang
Copy link
Owner

Hi there and thanks for the details. I'm happy to approve any reasonable PRs for this!

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