Which sunrise
The engine computes sunrise as the moment the top edge of the Sun's disc reaches the horizon, with standard atmospheric refraction (1013.25 hPa, 15 °C) for an observer at sea level, at the request's lat / lng. It searches from local midnight of the requested date (using your tz_offset_minutes), so the sunrise returned is the first one of that local calendar day.
Other software sometimes uses the centre of the disc, no refraction, or the observer's elevation. Each choice moves sunrise by up to a few minutes - enough to change which tithi or nakshatra is "at sunrise" on a day when one ends just after dawn.
What is anchored to it
POST /v1/panchang evaluates tithi, nakshatra, yoga and karana at sunrise, and takes the vara (weekday) from the local date at sunrise. For Mumbai on 1 December 2026:
| Field | Value |
|---|---|
sunrise / sunset | 06:55:17 / 17:59:26 IST (01:25:17Z / 12:29:26Z) |
vara | Mangalavara (Tuesday), lord Mars |
tithi | Krishna Ashtami - start 00:12:12 IST 1 Dec, end 23:14:22 IST 1 Dec |
nakshatra / yoga / karana | Magha / Vaidhriti / Balava |
The tithi start and end instants matter as much as the name. Observances are often decided by which tithi prevails at a time of day other than sunrise, and a tithi can begin and end on the same civil date or skip one entirely. Use the instants when you need "is it Ashtami at 18:00?", not the sunrise label. The element names are listed in the panchang elements reference.
All times are UTC
Every instant in the response is an ISO 8601 UTC string. The tz_offset_minutes you send decides which local day is meant; it does not change the format of the output. Convert for display with the same offset (or the user's zone), and remember that a sunrise in India is the previous evening in UTC-minus zones.
When the Sun does not rise
Inside the polar circles there are days with no sunrise or sunset. The API treats that as a fact about the place and date, not as an error in the panchang:
/v1/panchangfor Tromsø (69.65°N) on 21 December 2026 returns200withsunrise,sunset,moonriseandmoonsetallnull, and evaluates the five elements at local noon instead.- The
/v1/muhurta/*endpoints, which divide the sunrise-to-sunset day, return400 VALIDATION_ERROR: "No sunrise at latitude 69.65° on 2026-12-21 (midnight sun or polar night). Muhurta windows are divisions of the sunrise-to-sunset day, so they are undefined for this date and place." - Treat a
nulltime as "does not occur", never as midnight. The polar latitude errors page covers the other endpoints affected.
Questions
- Which definition of sunrise does the panchang use?
- The moment the top edge of the Sun's disc reaches the horizon, with standard atmospheric refraction, for an observer at sea level at the request's
latandlng. - Are panchang times returned in local time?
- No. Every instant is an ISO 8601 UTC string.
tz_offset_minutesdecides which local day is meant; it does not change the output format, so convert for display yourself.