API documentation
Dates & timezones
Technical representation of dates in Hyperline
Date Format and Timezone Handling
All dates in the Hyperline API are handled in UTC (Coordinated Universal Time). When sending dates to the API, you must convert your local timezone dates to UTC. Similarly, all dates returned by the API will be in UTC format.
Working with Customer Timezones
When creating subscriptions for customers in specific timezones, you’ll need to convert the desired local time to UTC before sending it to the API.
Examples
Let’s say you want to create a subscription that starts at midnight (00:00) in Paris timezone (Europe/Paris):
Note that the Z
suffix in the date string indicates that the timestamp is in UTC.
Best Practices
- Always use ISO 8601 format for dates
- Include the UTC indicator (
Z
) in your timestamps - Consider daylight saving time when converting from local timezones
- Use a reliable date library (like
date-fns
orluxon
) to handle timezone conversions
Was this page helpful?