Dates
Dates
All dates in our API are UTC format. You then need to use a date library such as moment.js to present dates to users based on either their local timezone, or the venue timezone, depending on what makes the most sense in each specific scenario.
The following query demonstrates how you would get the start date and region for an event which you can then use in your code to match state/region to a timezone and convert the UTC date to the venue timezone.
{
viewer(token: "your-token-here") {
getEvents {
items {
id
startDate
venue {
address {
region
}
}
}
}
}
}
We intend to expose the timezone directly in future, but this is not currently available.