Say I have a unix epoch time stamp 1664203669
. When generating a UTC date from this time stamp using datetime
I get the following date.
import datetime
datetime.datetime.utcfromtimestamp(1664203669).strftime("%Y-%m-%d %H:%M:%S")
Out[25]: '2022-09-26 14:47:49'
Though when using skyfield
I get the following date
from skyfield.api import load
load.timescale().utc(1970, 1, 1, 0, 0, 1664203669).utc_strftime()
Out[27]: '2022-09-26 14:47:22 UTC'
These UTC times are 27 seconds apart. Corresponding with the total number of leap seconds since 1970 to the given time stamp. From the skyfield
documentation this construction should handle leap seconds, but it doesn't seem to?
Why are these two date different?