# Calculate exact date and time from position of the sun - 88° degrees

I am currently working on an astrology project and need to figure out the exact date and time based on the sun's position of birth - 88° degree (approx. 89 days) before the moment of birth.

I am using the swisseph python library (https://astrorigin.com/pyswisseph/pydoc/index.html) to calculate planet postions.

For example: the following date (1991.01.07 09:27:00 UT) gives the longitude of the sun 286.57609582639475.

Now I would need a formula to calculate the UT time from this longitude of sun - 88° degree.

Does anybody have an idea?

This is how you can do it in Python using pyswisseph:

import swisseph as swe

# set ephemeris files path
swe.set_ephe_path('...')

# birth time as Julian day number (UT), for example
birth_t = swe.julday(2007, 7, 30, 8.5)
# sun longitude at birth
sun_longitude = swe.calc_ut(birth_t, swe.SUN)[0][0]
# longitude searched
xlon = swe.degnorm(sun_longitude - 88)
# start search 90 deays prior to birth
tstart = birth_t - 90
# find exact crossing time
res = swe.solcross_ut(xlon, tstart)
# turn it into a date
date = swe.revjul(res)

print("Year:", date[0], "Month:", date[1], "Day:", date[2], "Hour:", date[3])


You could try successive approximation using your Python library. Put in your best guess date/time and keep adjusting it to get 88 degrees.

• This is an great idea! Thank you very much! Jun 1 '21 at 18:51