TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/V3RNE42/helios/llms.txt
Use this file to discover all available pages before exploring further.
/api/timezone endpoint accepts a latitude and longitude and returns the UTC offset at that location in fractional hours. This is used by Helios to convert solar event times to local clock times when the user enables the “local time” option.
Request
Method:GETPath:
/api/timezone
Latitude in decimal degrees.
Longitude in decimal degrees.
Response
On success the endpoint returns a JSON object with the UTC offset for the given coordinates.UTC offset in hours (e.g.
1 for UTC+1, -5 for UTC-5). Can be fractional for half-hour or quarter-hour zones.response.ok and throws:
Providers
Primary — ipgeolocation.ioRequires the
IPGEOLOCATION_KEY environment variable.
Fallback — TimeZoneDBUsed when the primary provider fails. Requires the
TIMEZONEDB_KEY environment variable.
When this endpoint is called
This endpoint is only called when the user has enabled the local time option. When local time is disabled,getOffset is injected as a no-op and the endpoint is never contacted.
When local time is enabled, the endpoint is called multiple times per form submission:
- Once for the origin coordinates (to compute
startOffset) insidecheckLocal() - Once for the destination coordinates (to compute
endOffset) insidecheckLocal() - For each solar event along the route — sunrise position, sunset position, and solar noon position of every day-segment computed by
sectionFormatter()