How to use departure_time on google distance matrix api

Viewed 1592

In reading the documentation https://developers.google.com/maps/documentation/distance-matrix/intro the departure_time must be set in the future and based on January 1, 1970 UTC 00:00:00. This tells me that if I run a Distance Matrix API request during my working day in CT time zone I need to calculate the number of seconds from 1/1/1970 00:00:00 UTC to some future time say 03:00:00 on tomorrow morning for UTC-6 (CT time). Example: today is 5/31/2017, the number of seconds calculated should be the number of seconds between 1/1/1970 00:00:00 and 1/1/2017 03:00:00 – 6 hours (1496286000 – 360 = 1496285640) I insert departure_time=1496285640 . Will someone who has successfully used this optional parameter please confirm.

0 Answers
Related