4 ms·
Show HN: Commute Time Calculator
- sebastian_w 10y agoThis is pretty neat. Can you explain the time zone debug output? Is 6am in the table actually 6am in my local time when I run it?
- petko_minkov 10y agoThanks. 6AM in the table is 6AM where your location "A" is. This way, you can be in the Bay Area and query for commute times in New York, if you need to. It prints: Monday, 6am (target) is the same as following local time: Mon Mar 27 2017 03:00:00 GMT-0700 (PDT) Indeed, I'm in the Bay Area and I have to pass 3AM PDT to Google's API in order to get traffic for 6AM New York time. There might be a way to change the timezone with JS, but I didn't find it, so I'm just passing adjusted times from the local time zone.
- sebastian_w 10y agoThanks for the quick reply and the explanation!
- pawanpe 10y agoNice application. How do you calculate the time of travel. Are you using any google or other apis?