Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. $response = $this->client->get('timezone/json?location=' . $lat . ',' . $lng . '&timestamp=' . time() . '&key=' . config('integration-gmaps.api-key'));
  2. $result = (object)json_decode($response->getBody()->getContents());
  3.  
  4. if(isset($result,$result->timeZoneId)){
  5.    ///example hardcoded
  6.      Carbon::parse('11/12/2019 10:01',$result->timeZoneId);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement