API for time zones

TimeZone API is a set of functions designed for working with time zones. It allows you to obtain information about time zones based on geographic coordinates or IANA codes (e.g., Europe/Prague). These functions are essential for developers who work with local time or UTC time worldwide.
- Search by coordinates: Get the time zone and time information by entering the latitude and longitude.
- Search by IANA code: Retrieve detailed information about a time zone using its IANA name.
- Time conversion: Convert times between different time zones or between local time and UTC.
- Current time: Find out the current time in any time zone.
- Scheduling and time differences: Calculate time differences for planning events across time zones.
Usage examples:
– Find the current time in New York
– Convert the opening hours of a branch in Tokyo to local time in the Czech Republic
– Display the local start time and time offset for GPX route records around the world.
See a specific usage example in this tutorial.
Function Descriptions
- list-timezones – Returns a list of IANA names of all time zones
- timezone – Returns detailed information about a time zone – the input parameter is the IANA name
- coordinate – Returns detailed information about the time zone at the given coordinates – the input is the coordinates
Technical Documentation
https://api.mapy.com/v1/docs/timezone/
The technical documentation includes a detailed description of input and output parameters, default values, errors, and other specifics.
Return Values for timezone and coordinate
Both of these functions return detailed information about the time zone
| timezoneName | IANA name of the time zone (e.g., Europe/Prague) |
| currentTimeAbbreviation | Current abbreviation of the time zone (e.g., CEST) |
| standardTimeAbbreviation | Standard time abbreviation (e.g., CET) |
| currentLocalTime | Current local time in ISO 8601 format (e.g., 2024-10-16T15:03:51.248) |
| currentUtcTime | Current UTC time in ISO 8601 format (e.g., 2024-10-16T13:03:51.248Z) |
| currentUtcOffsetSeconds | Current UTC offset in seconds (e.g., 7200) |
| standardUtcOffsetSeconds | Standard UTC offset in seconds (e.g., 3600) |
| hasDst | Indicator if the time zone observes daylight saving time (true/false) |
| isDstActive | Indicator if daylight saving time is currently active (true/false) |
| dstInfo.dstAbbreviation | Daylight saving time abbreviation (e.g., CEST) |
| dstInfo.dstStartUtcTime | UTC time when daylight saving time starts in ISO 8601 format (e.g., 2024-03-31T01:00:00.000Z) |
| dstInfo.dstStartLocalTime | Local time when daylight saving time starts in ISO 8601 format (e.g., 2024-03-31T03:00:00.000) |
| dstInfo.dstEndUtcTime | UTC time when daylight saving time ends in ISO 8601 format (e.g., 2024-10-27T01:00:00.000Z) |
| dstInfo.dstEndLocalTime | Local time when daylight saving time ends in ISO 8601 format (e.g., 2024-10-27T02:00:00.000) |
| dstInfo.dstOffsetSeconds | Daylight saving time offset from standard time in seconds (e.g., 3600) |
| dstInfo.dstDurationSeconds | Duration of daylight saving time in seconds (e.g., 18144000) |