Timezones

This document covers information about the wunderbon preferred timezone and how to deal with it

👍

TL;DR

@TODO TIMEZONES

Some requests that create new data, such as creating a new Receipt, allow you to provide time zone information when specifying or generating timestamps.

64

Providing ISO 8601

For API calls that allow for a timestamp to be specified, we use that exact timestamp. An example of this is the Receipts API.

📘

All timestamps return in ISO 8601 format

YYYY-MM-DDTHH:MM:SSZ

These timestamps look something like 2020-05-23T23:05:18+01:00. We apply the following rules, in order of priority, to determine timezone information for API calls ...

Using Time-Zone Header

It is possible to supply a Time-Zone header which defines a timezone according to the list of names from the Olson database.

curl -LH "Time-Zone: Europe/Amsterdam" \ 
 -X POST https://playground-api.wunderbon.io/receipts

This means that we generate a timestamp for the moment your API call is made in the timezone this header defines. For example, the Receipts API uses the current time as the timestamp. This header will determine the timezone used for generating that current timestamp.

Default to UTC

If the steps above don't result in any information, we use UTC as the timezone to create the receipt.


What’s Next

Continue with our guided tour. Now, we would like to tell you more about Versions and what we recommend to every of our users when developing against the wunderbon API ...