What time is it here at sea ? About nautical time
A ship within the territorial waters of any nation uses that nation's time.
In international waters, time zone boundaries are meridians 15° apart, except that UTC−12 and UTC+12 are each 7.5° wide and are separated by the 180° meridian (not by the International Date Line, which is for land and territorial waters only).
A captain can change ship's clocks any time after entering a new time zone.
The solution : The GeoGarage maritime Time Zone API
The GeoGarage maritime Time Zone API provides a simple interface to request the time zone for a location on oceans and seas, as well as that location's time offset from UTC.
Effectively, the other APIs available on the market such as the Google Time Zone API only manages land/earth locations :
"Note that time zone data may not be available for locations over water, such as oceans or seas.”
source : https://developers.google.com/maps/documentation/timezone/
Our GeoGarage TZ database is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets and daylight-saving rules.
Requesting the time zone information for a specific Latitude/Longitude pair whatever on the whole planet will return the name of that time zone, the time offset from UTC, and the Daylight Savings offset.
You access the GeoGarage Time Zone API through an HTTPS interface.
This document is intended for website and mobile developers who want to include time data on nautical maps provided by the GeoGarage nautical charts API.
Note : today, the GeoGarage Time Zone API can't be sold independently to the usual nautical charts API.
A Time Zone API specific for maritime areas
GeoGarage Time Zone worldwide map
The colors have been chosen to reflect the offset from GMT and the outlines show the boundaries and maritime territorial limits of the time zones of the world.
Time Zone Requests
The GeoGarage Time Zone API returns time zone data for a point on the oceans, specified by a Latitude and Longitude.
A Time Zone API URL must be of the following form:
Ex : https://fastapi.geogarage.com/timezone/?lat=-20.303418&lon=155.208545&key=6d4558cef22ce8b18718f88b233f6d72a7c4ed8b
- lat : Latitude ranges between -90 and 90 degrees,
- lon : Longitude ranges between -180 and 180 degrees,
- key — your application's API key. This key identifies your application and client number.
Important: Requests must be submitted via https, not http.
- time_zone : Time offset from Coordinated Universal Time (UTC, aka “zulu” time)
- tz_name1st : Name of the Time Zone
- places : List of place
- dst_places : List of places with daylight savings times.
The GeoGarage Time Zone API supports JSON output formats:
"places": "Papua New Guinea, Australia (Queensland, New South Wales, Tasmania, Victoria)",
"dst_places": "Australia (New South Wales, Tasmania, Victoria)"