The solar position algorithm from NREL needs a delta t parameter to account for the changes in Earth's rotation. That number can change by a few seconds over many months, so maybe it is worth putting in a function to get the data from the USNO or at least use an equation from NASA.