<p>Ok guys, I've found the solution. Sadly, if you really want to know the really  exact datetime, there is no exact and universal formula.</p>

<p>I found several formulas:</p>

<p><a href="https://physics.stackexchange.com/questions/25336/reverse-sun-position-algorithm">https://physics.stackexchange.com/questions/25336/reverse-sun-position-algorithm</a></p>

<p><a href="http://www.pveducation.org/pvcdrom/properties-of-sunlight/declination-angle" rel="nofollow noreferrer">http://www.pveducation.org/pvcdrom/properties-of-sunlight/declination-angle</a></p>

<p><a href="http://www.itacanet.org/the-sun-as-a-source-of-energy/part-3-calculating-solar-angles/" rel="nofollow noreferrer">http://www.itacanet.org/the-sun-as-a-source-of-energy/part-3-calculating-solar-angles/</a></p>

<p>There are several problem with these formulas.</p>

<p><strong>What I'd like to know?</strong></p>

<p>As I mentioned in my original post, I have a datetime, and a geolocation, and with that Swiss ephemeris program, I can "query" the angle of the sun.</p>

<p>From this point, I substract 88 degree with this angle, and I want to know the exact date time by the angle and the geolocation.</p>

<p><strong>The problems</strong></p>

<p>The first problem is the declination. There are several problems with this. The declination is not the same at every day in a year as you know. Ok, let's say, I want to figure it out. I can not. Since, I want to know the exact date first, I do not know, the ordinal date. Sigh, at this point the whole formula has a missing value. But, let's assume, I know. Even, if I know the ordinal date, the formula is not right, because the declination is not the same at 2015-01-01 and 2016-01-01. Let's see:</p>

<pre><code>swetest.exe -edirD:/Apache/htdocs/astro/vendors/swiss/ -b01.01.2010 -geopos19.2,47.29,0 -topo  -p0 -eswe -fPlTd -g, -head -n5 -s365.4
Sun            , 280.4507684,01.01.2010,-23.0283899
Sun            , 280.6104798,01.01.2011 9:36:00 ET,-23.0160751
Sun            , 280.7713793,01.01.2012 19:12:00 ET,-23.0008866
Sun            , 280.9345061,01.01.2013 4:48:00 ET,-22.9876598
Sun            , 281.0890407,01.01.2014 14:24:00 ET,-22.9741190
</code></pre>

<p>-22...., -23... is the declination. Declination is the same in a day. </p>

<p>So these formulas can gives you approximate results, but not the exact, even if you know the ordinal date. And I think, the formula is does not calculate with the leap years.</p>

<p><strong>The solution</strong></p>

<p>In my case, the solution was to track back 95 days, and get 20 recors for every day from that time. 95 because the sun is moving 1 degree about 1 day and 2-3 hours. The sun has different speed at different dates, 95days seems enought for me for 88 degree.</p>

<p>With my program, I am checking, where the integer values are equals. For example, if I need to get 69.217465 degree I am just checking, where the sun was in 69.xxxxx position.</p>

<p>When I have this date, I am track back 3 days, and list the values by hours, 72 hours. I get the  proximate date and time. And after this, I track back 3 hours, and listing the results by seconds.</p>

<p>This will be the exact (most proximate) date and time.</p>

<p>From a Yahoo group, a guy told me, this is an interpolation. This is how you can get the exact date time for a given angle, I do not know more precise method. If you know, please write me.</p>

CC BY-SA 3.0
2017-10-09T09:31:29.250Z
Your algorithm is right but you can use sun's speed (option "s") to calculate time. In my case i found exactly date and time which is corresponding with 88 sun degree with only two steps.
Hokku San
CC BY-SA 3.0
2017-10-09T09:34:18.913Z
Could you please explain method do determine birth's date timezone?
Hokku San
CC BY-SA 3.0
2017-11-04T09:51:44.977Z
I am using UTC everywhere, and later convert it by programming language and not use `-geopos19.2,47.29,0 -topo`
vaso123
CC BY-SA 3.0
2015-12-22T13:03:56.093Z
2015-12-22T13:03:56.093Z
2017-04-13T12:40:15.377Z
vaso123
<p>I think you can very easily use the transformations available in the wiki link to obtain the Julian day, then exploit the position of observer to get local sidereal time.
Lets start by computing the Julian day
you have a given longitude $L$ which gives you $n$ number of days since Greenwich noon as<br>
$$n = \dfrac{L-280.4860}{0.9856474}$$
giving the corresponding Julian day as<br>
$$JD = n+2451545$$
once you have Julian day you can use the following link to obtain UT<br>
<a href="http://ssd.jpl.nasa.gov/tc.cgi" rel="nofollow">http://ssd.jpl.nasa.gov/tc.cgi</a>  </p>

CC BY-SA 3.0
2015-12-22T12:34:58.470Z
Thank you for this answer, but before this, I found the solution, and this is bad because: you want to know the exact date, and this need the `n`, what I do not know. And this is not good, because I've checked, and the angle is not the same in every year 1st day. I think, because of the leap year.
vaso123
CC BY-SA 3.0
2015-12-22T13:44:01.240Z
@lolka_bolka for $n$ you only need the longitude of the sun, which you mentioned in the question. 
Yes, the angle is not the same each year which is why for astronomical computations you have the concept of Julian day, which is continuous increment in days since 4713 BC Jan 1, removing the concept of leap year. If I understood your question correctly this should have been enough
Astroynamicist
CC BY-SA 3.0
2015-12-19T00:13:02.117Z
2016-08-25T22:24:35.273Z
2016-08-25T22:24:35.273Z
Astroynamicist
<p>I am working on an astrology project (don't panic, my question is about astronomy or math), where I need to figure out some values by the longnitude of the planets.</p>

<p>I have a program for this, the <a href="http://www.astro.com/swisseph/swephinfo_e.htm" rel="noreferrer">Swiss ephemeris</a>.</p>

<p>With this, I can get the position of the planets by the time and the geolocation of the observer.</p>

<p>What I need to do is to do it backward, so I need to get the exact date and time by the given position of the sun and the position of the observer.</p>

<p>For example, today (2015.12.16 00:00:00 UT) the longitude of the sun is 263.6893755 from postion (lng,lat,alt) 19.2,47.29,0 on Earth.</p>

<p>I need a formula, what tells me, what was the UT time from this longitude of sun -88 degree.</p>

<p>Can anybody give me a clue, how can I calculate this?</p>

<p>I made some research of course on the net, and I found the related <a href="https://en.wikipedia.org/wiki/Position_of_the_Sun" rel="noreferrer">wiki</a> article, but if I am honest, there are too many unknown terms and phrase here, what I really do not understand, and I do not want to dig in too deep. </p>

CC BY-SA 3.0
2015-12-16T11:16:57.897Z
Maybe this will be the answer, somebody asked exact the same thing: http://physics.stackexchange.com/questions/25336/reverse-sun-position-algorithm

I will tell you if it is.
vaso123
CC BY-SA 3.0
2015-12-17T09:37:43.560Z
No, it does not helped. First of all, the delta is not precise enough, and I want to know the date, but delta need the date.
vaso123
CC BY-SA 4.0
2021-08-26T00:57:24.500Z
Answer here (for Python programming language): https://astronomy.stackexchange.com/questions/44034/calculate-exact-date-and-time-from-position-of-the-sun-88-degrees
Stan
<positional-astronomy>
Get date and time by position of the sun and the observer position
vaso123
# Get date and time by position of the sun and the observer position

(Asked by: username_0 on 2015-12-16)

I am working on an astrology project (don't panic, my question is about astronomy or math), where I need to figure out some values by the longnitude of the planets.

I have a program for this, the [Swiss ephemeris](http://www.astro.com/swisseph/swephinfo_e.htm).

With this, I can get the position of the planets by the time and the geolocation of the observer.

What I need to do is to do it backward, so I need to get the exact date and time by the given position of the sun and the position of the observer.

For example, today (2015.12.16 00:00:00 UT) the longitude of the sun is 263.6893755 from postion (lng,lat,alt) 19.2,47.29,0 on Earth.

I need a formula, what tells me, what was the UT time from this longitude of sun -88 degree.

Can anybody give me a clue, how can I calculate this?

I made some research of course on the net, and I found the related [wiki](https://en.wikipedia.org/wiki/Position_of_the_Sun) article, but if I am honest, there are too many unknown terms and phrase here, what I really do not understand, and I do not want to dig in too deep.

**Tags:** positional-astronomy

> **Comments:**
> **username_0**: Maybe this will be the answer, somebody asked exact the same thing: http://physics.stackexchange.com/questions/25336/reverse-sun-position-algorithm  I will tell you if it is.  
> **username_0**: No, it does not helped. First of all, the delta is not precise enough, and I want to know the date, but delta need the date.  
> **username_1**: Answer here (for Python programming language): https://astronomy.stackexchange.com/questions/44034/calculate-exact-date-and-time-from-position-of-the-sun-88-degrees  

---

## 2 answers

### Answer by username_0 on 2015-12-22. Score: 2 | Accepted answer

Ok guys, I've found the solution. Sadly, if you really want to know the really  exact datetime, there is no exact and universal formula.
I found several formulas:
https://physics.stackexchange.com/questions/25336/reverse-sun-position-algorithm
http://www.pveducation.org/pvcdrom/properties-of-sunlight/declination-angle
http://www.itacanet.org/the-sun-as-a-source-of-energy/part-3-calculating-solar-angles/
There are several problem with these formulas.
What I'd like to know?
As I mentioned in my original post, I have a datetime, and a geolocation, and with that Swiss ephemeris program, I can "query" the angle of the sun.
From this point, I substract 88 degree with this angle, and I want to know the exact date time by the angle and the geolocation.
The problems
The first problem is the declination. There are several problems with this. The declination is not the same at every day in a year as you know. Ok, let's say, I want to figure it out. I can not. Since, I want to know the exact date first, I do not know, the ordinal date. Sigh, at this point the whole formula has a missing value. But, let's assume, I know. Even, if I know the ordinal date, the formula is not right, because the declination is not the same at 2015-01-01 and 2016-01-01. Let's see:
swetest.exe -edirD:/Apache/htdocs/astro/vendors/swiss/ -b01.01.2010 -geopos19.2,47.29,0 -topo  -p0 -eswe -fPlTd -g, -head -n5 -s365.4
Sun            , 280.4507684,01.01.2010,-23.0283899
Sun            , 280.6104798,01.01.2011 9:36:00 ET,-23.0160751
Sun            , 280.7713793,01.01.2012 19:12:00 ET,-23.0008866
Sun            , 280.9345061,01.01.2013 4:48:00 ET,-22.9876598
Sun            , 281.0890407,01.01.2014 14:24:00 ET,-22.9741190

-22...., -23... is the declination. Declination is the same in a day. 
So these formulas can gives you approximate results, but not the exact, even if you know the ordinal date. And I think, the formula is does not calculate with the leap years.
The solution
In my case, the solution was to track back 95 days, and get 20 recors for every day from that time. 95 because the sun is moving 1 degree about 1 day and 2-3 hours. The sun has different speed at different dates, 95days seems enought for me for 88 degree.
With my program, I am checking, where the integer values are equals. For example, if I need to get 69.217465 degree I am just checking, where the sun was in 69.xxxxx position.
When I have this date, I am track back 3 days, and list the values by hours, 72 hours. I get the  proximate date and time. And after this, I track back 3 hours, and listing the results by seconds.
This will be the exact (most proximate) date and time.
From a Yahoo group, a guy told me, this is an interpolation. This is how you can get the exact date time for a given angle, I do not know more precise method. If you know, please write me.

> **Comments:**
> **username_2**: Your algorithm is right but you can use sun's speed (option "s") to calculate time. In my case i found exactly date and time which is corresponding with 88 sun degree with only two steps.  
> **username_2**: Could you please explain method do determine birth's date timezone?  
> **username_0**: I am using UTC everywhere, and later convert it by programming language and not use `-geopos19.2,47.29,0 -topo`  

---

### Answer by username_3 on 2015-12-19. Score: 3

I think you can very easily use the transformations available in the wiki link to obtain the Julian day, then exploit the position of observer to get local sidereal time.
Lets start by computing the Julian day
you have a given longitude $L$ which gives you $n$ number of days since Greenwich noon as  
$$n = \dfrac{L-280.4860}{0.9856474}$$
giving the corresponding Julian day as  
$$JD = n+2451545$$
once you have Julian day you can use the following link to obtain UT  
<http://ssd.jpl.nasa.gov/tc.cgi>

> **Comments:**
> **username_0**: Thank you for this answer, but before this, I found the solution, and this is bad because: you want to know the exact date, and this need the `n`, what I do not know. And this is not good, because I've checked, and the angle is not the same in every year 1st day. I think, because of the leap year.  
> **username_3**: @lolka_bolka for $n$ you only need the longitude of the sun, which you mentioned in the question.  Yes, the angle is not the same each year which is why for astronomical computations you have the concept of Julian day, which is continuous increment in days since 4713 BC Jan 1, removing the concept of leap year. If I understood your question correctly this should have been enough  

---

