Перейти до вмісту
AstroWay/api v2.173.1 · docs
усі системи в нормі

True solar time

POST
/chinese/true-solar-time
request.sh
curl -X POST https://api.astroway.info/v1/chinese/true-solar-time \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "date": "1995-06-15", "time": "09:20:00", "timezoneOffset": 8, "longitude": 75.9 }'

The clock corrected to the sun over the birth longitude, split into the meridian term and the equation of time. China runs one zone across sixty degrees, so a Kashgar birth reads nearly three hours from solar noon on a Beijing clock, which moves the hour pillar.

Media type application/json
object
date required
string
/^\d{4}-\d{2}-\d{2}$/
time required
string
/^\d{2}:\d{2}(:\d{2})?$/
timezoneOffset required
number
>= -14 <= 14
longitude required
number
>= -180 <= 180
language
string
Example
{
"date": "1995-06-15",
"time": "09:20:00",
"timezoneOffset": 8,
"longitude": 75.9
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
input
object
date
string
nullable
time
string
nullable
timezoneOffset
number
nullable
longitude
number
nullable
clockTime
string
nullable
trueSolarTime
string
nullable
totalCorrectionMinutes
number
nullable
longitudeCorrectionMinutes
number
nullable
equationOfTimeMinutes
number
nullable
dayShift
number
nullable
date
string
nullable
hourBranchNote
string
nullable
methodology
string
nullable
note
string
nullable
source
string
nullable
Example
{
"ok": true,
"data": {
"input": {
"date": "1995-06-15",
"time": "09:20:00",
"timezoneOffset": 8,
"longitude": 75.9
},
"clockTime": "09:20:00",
"trueSolarTime": "06:23:20",
"totalCorrectionMinutes": -176.66,
"longitudeCorrectionMinutes": -176.4,
"equationOfTimeMinutes": -0.26,
"dayShift": 0,
"date": "1995-06-15",
"hourBranchNote": "The double-hour is cut from the sun over the birth place, so this is the clock the hour pillar should be read from. A correction of an hour or more moves the branch; near midnight it moves the day pillar too.",
"methodology": "True solar time is the hour angle of the apparent Sun at the birth longitude, carried round by half a day. It decomposes into the meridian term, (longitude - 15 x timezoneOffset) x 4 minutes, and the equation of time, the Sun's own annual wobble of up to about sixteen minutes. Both are reported.",
"note": "timezoneOffset is the offset the clock was actually running on, which only the caller knows: a 1988 Beijing birth ran on UTC+9 under summer time, not UTC+8, and no arithmetic here can recover that from the date.",
"source": "Swiss Ephemeris apparent right ascension; equation of time verified against the published annual extrema"
}
}

Validation error

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?