Module: GoogleMapsApis::Services::TimeZone
- Included in:
- Client
- Defined in:
- lib/google_maps_apis/services/time_zone.rb
Overview
Performs requests to the Google Maps TimeZone API."""
Instance Method Summary collapse
-
#timezone(location, timestamp: Time.now, language: nil) ⇒ Hash
Get time zone for a location on the earth, as well as that location's time offset from UTC.
Instance Method Details
#timezone(location, timestamp: Time.now, language: nil) ⇒ Hash
Get time zone for a location on the earth, as well as that location's time offset from UTC.
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/google_maps_apis/services/time_zone.rb', line 27 def timezone(location, timestamp: Time.now, language: nil) location = GoogleMapsApis::Convert.latlng(location) = GoogleMapsApis::Convert.time() params = { location: location, timestamp: } params[:language] = language if language return get('/maps/api/timezone/json', params) end |