Astrology API

Astrology API

Handling Timezones in API Requests

Last updated on 29 Jan, 2026

By default, the API auto-detects timezone from the city you provide. Pass "city": "Berlin" and we'll figure out it's Europe/Berlin for you.But here's the thing — you can override this behavior.

Quick examples:

// Auto timezone (recommended for most cases)
{
  "city": "Berlin",
  "country_code": "DE",
  "hour": 18,
  "minute": 0
}
// → 18:00 Berlin time (Europe/Berlin)

// Explicit timezone override
{
  "city": "Berlin", 
  "country_code": "DE",
  "hour": 17,
  "minute": 0,
  "timezone": "UTC"
}
// → 17:00 UTC (coords from Berlin, but time treated as UTC)

When to use timezone override?**

  • Your client's app stores timestamps in UTC

  • You're syncing across multiple timezones

  • You want precise control over time interpretation

Priority order:

  1. If you pass timezone → we use it, no questions asked

  2. If you pass city only → we auto-detect timezone from location

  3. If you pass latitude/longitude only → we auto-detect timezone from coords

Pro tip: If your client is in Berlin and asks a question at 6pm local time, just pass "hour": 18 with "city": "Berlin". We handle the UTC conversion internally. Don't overthink it.

Was this page helpful?

Powered by InstantDocs