Set your time zone

We'll teach you how to personalize your request. The first thing on the to-do list is to display different time zones because you probably want all the data with the times that apply to your time zone.

After all, having the data displayed in your preferred time zone would be pretty convenient, right?

Setting your time zone

All of our dates and times are displayed in UTC by default. However, most applications indicate the times in their relevant time zones, such as CEST and PST.

You wouldnโ€™t want to frustrate your clients by sending them the times of matches in the central European time zone when they live in Australia, now would you?

Thatโ€™s why weโ€™ve made it easy for you to get all the dates and times in whatever time zone you prefer.

โ€œHow do I do that?โ€œ Easy! Simply override the default time zone (UTC) with the parameter called: timezone.

In this tutorial, weโ€™ll add the โ€˜timezoneโ€™ parameter to a request with the livescore endpoint.

The only thing you have to do is add &timezone={code from Wikipedia}.

For example, if youโ€™re interested in the Asian/Singaporean timezone, this will result in the following request:

And just like that, we've successfully requested the data to be returned in the Asian/Singaporean time zone instead of the default UTC.

There are 355 time zones on the Wikipedia page. Please make sure you use the correct time zone.

When youโ€™ve parsed an invalid time zone, youโ€™ll get the error code 400. For an overview of all error codes, see our response code page.

Now that youโ€™ve successfully changed the time zone to the one you desire, we can move on to explore the next part of our tutorial series, which is about pagination.

Last updated