# 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])

• Are you sure that the python library pyswisseph has a 'solcross_ut' method? Because I get the following error: AttributeError: module 'swisseph' has no attribute 'solcross_ut' Commented Jun 1, 2022 at 12:52

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

• Do you know how to get Geocenteric or heliocentric positions Commented Oct 12, 2023 at 13:44
• @user1047873 positions of what? Whatever it is you have to know its position in some coordinate system and then convert with widely available conversion equations. Commented Oct 13, 2023 at 16:56
• Can you please help me to convert Geocenteric to Heliocenteric coordinates ? Commented Oct 14, 2023 at 6:25
• @user1047873: See en.wikipedia.org/wiki/Astronomical_coordinate_systems Commented Oct 14, 2023 at 12:47