adamhwang / ita-matrix-powertools

ITA Matrix Powertools
https://chrome.google.com/webstore/detail/ita-matrix-powertools/menecfddnlmanmpadcalononkolnplpp?hl=en
GNU General Public License v2.0
63 stars 13 forks source link

Improper 12-hour clock usage #13

Open d5xtgr opened 7 months ago

d5xtgr commented 7 months ago

Air Canada appears to blindly trust the times provided in the BDATE* 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:

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 commented 6 months ago

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