<p>There are many calculators online to convert local time to local sidereal time, but I can't find any resources to convert the other way.  Can you convert back by doing the same conversion backwards?  I found equations on <a href="http://aa.usno.navy.mil/faq/docs/GAST.php" rel="nofollow noreferrer">this website</a> to convert to LST.  Would it be valid to use this equation to convert back:</p>

<p>$$
UT = \frac{LST - \frac{L}{15} - 6.697374558 - 2400.051336*T - 0.000025862*T^2)}{1.0027379093}
$$</p>

<p>where $UT$ is the time in Universal Coordinated Time, $LST$ is the Local Sidereal Time, $L$ is the longitude, and $T$ is:</p>

<p>$$
T = \frac{JD-2451545.0}{36525.0}
$$
where JD is the Julian Date at noon UTC.  Once I've calculated the time in UT, I then add or subtract 24 until the result is within 0 - 24 hours.  Then I can convert from UT to local time.</p>

<p>I would prefer to have this as accurate as possible.  I did a calculation using this, but according to Stellarium I was off by about an hour.  Could this be due to Daylight Savings time or something?</p>

<p>Here is the Python code I made to do the calculation.</p>

<pre><code>LST = 8 + ((37 + (5.642/60))/60)
JD0 = 2457813.5
L = - 106.6056
GMST = LST - L/(365/(23 + ((56 + (4.1/60))/60)))
T = (JD0 - 2451545)/36525
UT = (GMST - 6.697374558 - 2400.051336*T - 0.000025862*(T*T))/1.0027379093


while UT &lt;0:
    UT += 24


LT = UT - 7

while LT &lt; 0:
    LT += 24
</code></pre>

CC BY-SA 3.0
2017-12-29T20:50:58.990Z
@barrycarter Sure; I made a Python script to do it.
Phiteros
CC BY-SA 4.0
2023-11-26T07:02:58.017Z
I assume the $ UT - 7 $ is accounting for your time zone offset, is that DST or standard time?  For "as accurate as possible" you'll have to account for nutation, and the observed UT1-UTC offset published by the IERS: https://www.iers.org/IERS/EN/Publications/Bulletins/bulletins.html
Greg Miller
<time>
How do you calculate local time from local sidereal time?
Phiteros
# How do you calculate local time from local sidereal time?

(Asked by: username_0 on 2017-03-06)

There are many calculators online to convert local time to local sidereal time, but I can't find any resources to convert the other way.  Can you convert back by doing the same conversion backwards?  I found equations on this website to convert to LST.  Would it be valid to use this equation to convert back:
$$
UT = \frac{LST - \frac{L}{15} - 6.697374558 - 2400.051336*T - 0.000025862*T^2)}{1.0027379093}
$$
where $UT$ is the time in Universal Coordinated Time, $LST$ is the Local Sidereal Time, $L$ is the longitude, and $T$ is:
$$
T = \frac{JD-2451545.0}{36525.0}
$$
where JD is the Julian Date at noon UTC.  Once I've calculated the time in UT, I then add or subtract 24 until the result is within 0 - 24 hours.  Then I can convert from UT to local time.
I would prefer to have this as accurate as possible.  I did a calculation using this, but according to Stellarium I was off by about an hour.  Could this be due to Daylight Savings time or something?
Here is the Python code I made to do the calculation.
LST = 8 + ((37 + (5.642/60))/60)
JD0 = 2457813.5
L = - 106.6056
GMST = LST - L/(365/(23 + ((56 + (4.1/60))/60)))
T = (JD0 - 2451545)/36525
UT = (GMST - 6.697374558 - 2400.051336*T - 0.000025862*(T*T))/1.0027379093


while UT <0:
    UT += 24


LT = UT - 7

while LT < 0:
    LT += 24

**Tags:** time
> **Comments:**
> **username_0**: @barrycarter Sure; I made a Python script to do it.  
> **username_1**: I assume the $ UT - 7 $ is accounting for your time zone offset, is that DST or standard time?  For "as accurate as possible" you'll have to account for nutation, and the observed UT1-UTC offset published by the IERS: https://www.iers.org/IERS/EN/Publications/Bulletins/bulletins.html  

---

## 0 answers

