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

CC BY-SA 4.0
2023-10-12T13:44:21.080Z
Do you know how to get Geocenteric or heliocentric positions
user1047873
CC BY-SA 4.0
2023-10-13T16:56:24.030Z
@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.
stretch
CC BY-SA 4.0
2023-10-14T06:25:50.263Z
Can you please help me to convert Geocenteric to Heliocenteric coordinates ?
user1047873
CC BY-SA 4.0
2023-10-14T12:47:49.967Z
@user1047873: See  https://en.wikipedia.org/wiki/Astronomical_coordinate_systems
stretch
CC BY-SA 4.0
2021-05-29T18:25:11.573Z
2021-05-29T18:25:11.573Z
stretch
<p>This is how you can do it in Python using <a href="https://pypi.org/project/pyswisseph/" rel="nofollow noreferrer">pyswisseph</a>:</p>
<pre><code>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(&quot;Year:&quot;, date[0], &quot;Month:&quot;, date[1], &quot;Day:&quot;, date[2], &quot;Hour:&quot;, date[3])
</code></pre>

CC BY-SA 4.0
2022-06-01T12:52:35.993Z
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'
Ricardo Hauffe
CC BY-SA 4.0
2021-08-06T23:16:07.423Z
2021-08-07T03:38:38.133Z
2021-08-07T03:38:38.133Z
Stan
<p>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.</p>
<p>I am using the swisseph python library (<a href="https://astrorigin.com/pyswisseph/pydoc/index.html" rel="nofollow noreferrer">https://astrorigin.com/pyswisseph/pydoc/index.html</a>) to calculate planet postions.</p>
<p>For example: the following date (1991.01.07 09:27:00 UT) gives the longitude of the sun 286.57609582639475.</p>
<p>Now I would need a formula to calculate the UT time from this longitude of sun - 88° degree.</p>
<p>Does anybody have an idea?</p>

<observational-astronomy><python>
Calculate exact date and time from position of the sun - 88° degrees
Ricardo Hauffe
# Calculate exact date and time from position of the sun - 88° degrees

(Asked by: username_0 on 2021-05-27)

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?

**Tags:** observational-astronomy, python


---

## 2 answers

### Answer by username_1 on 2021-05-29. Score: 1 | Accepted answer

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

> **Comments:**
> **username_2**: Do you know how to get Geocenteric or heliocentric positions  
> **username_1**: @username_2 positions of what? Whatever it is you have to know its position in some coordinate system and then convert with widely available conversion equations.  
> **username_2**: Can you please help me to convert Geocenteric to Heliocenteric coordinates ?  
> **username_1**: @username_2: See  https://en.wikipedia.org/wiki/Astronomical_coordinate_systems  

---

### Answer by username_3 on 2021-08-06. Score: 2

This is how you can do it in Python using [pyswisseph](https://pypi.org/project/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])

```

> **Comments:**
> **username_0**: 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'  

---

