I am an astro-particle physicist looking for some simulation based on the experiment observation.

The simulation dataset contains 10 digit Epoch dataset for UTC time, however, I need to convert this into LST.


Fortunately, I could find a converting website for 10 digit Unix epoch to actual UTC time, however, I could not find out how could I convert it into LST.

Local Sidereal Time

Here is also a formula but I don't know the formula for UTC to UT (Universe time), so I don't think using this will help me a lot for my purpose.

If anyone can offer me nice converting formula, it would be great.

  • 3
    $\begingroup$ The IERS publishes UTC-UT1 every day: iers.org/IERS/EN/DataProducts/EarthOrientationData/eop.html . Also be aware there is apparent sidereal time and mean sidereal time, you should look in to both to determine which you need. If you're looking at UTC-UT1, my bet is you want apparent. $\endgroup$ Commented Apr 24, 2023 at 23:07
  • $\begingroup$ Note that Unix / POSIX timestamps are kind of synchronised to UTC, but there are problems with leap seconds. See unix.stackexchange.com/q/283164/88378 $\endgroup$
    – PM 2Ring
    Commented Apr 25, 2023 at 4:13
  • $\begingroup$ From ucolick.org/~sla/leapsecs/right+gps.html The POSIX standard requires that the value of time_t have a simple relationship to date and time where each day has 86400 seconds. Such a requirement demands that POSIX systems not count leap seconds because they produce days which have 86401 seconds. The POSIX standard also specifies that the time and date values be UTC. UTC has had leap seconds, so the combination of the two requirements is inconsistent with the broadcast time signals that are used to set system clocks. $\endgroup$
    – PM 2Ring
    Commented Apr 25, 2023 at 4:13

2 Answers 2


There isn't a formula for converting Unix epoch to universal time. This is because universal time is based on the rotation of the Earth, which is not constant (at the level of accuracy achieved by atomic clocks).

But UTC is "coordinated" to UT by the addition of leap seconds. This means that UTC will never be more than 0.9 seconds out from UT. It is quite possible that for your purposes, you may assume UT=UTC. This is especially true if your unix timestamps have been collected from a regular computer, or if the time stamps have been given as integers (as most computer clocks can't be trusted to sub-second accuracy)

If you do need sub-second accuracy you may use a graph like the one on Wikipedia. This shows how many seconds you need to add or subtract from UTC to get UT. (the data used to create this graph is linked to from the Wikipedia page).

enter image description here


I think one simple way to do this is with astropy. The following code uses the unix time and the Earth location of an address to calculate the sidereal time.

import astropy.time
import astropy.coordinates
import astropy.visualization

time = astropy.time.Time(
    val=[1682375763, 1682375764, 1682375765, ],
    location=astropy.coordinates.EarthLocation.of_address("Bozeman, MT")

time_sidereal = time.sidereal_time("apparent")


which prints

[5h22m39.19199396s 5h22m40.19473194s 5h22m41.19746992s]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .