Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Changed
^^^^^^^
* matplotlib is now an optional ``doc`` dependency instead of a required
dependency. (:pull:`146`)
* Add support for correctly handling sub-second timestamp resolution in
:py:func:`solposx.solarposition.usno`. (:issue:`156`, :pull:`157`)

Added
^^^^^
Expand Down
4 changes: 1 addition & 3 deletions src/solposx/solarposition/usno.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ def usno(times, latitude, longitude, *, delta_t=67.0, gmst_option=1):
d = asind(sind(e) * sind(L))

# JD_0 is the Julian date of the previous midnight (0h) UT1
midnight = pd.DatetimeIndex(
[t.replace(hour=0, minute=0, second=0) for t in times_utc]
)
midnight = times_utc.normalize() # Convert times_utc to midnight

JD_0 = midnight.to_julian_date()

Expand Down
Loading