The code contains the following cryptic comment:
Notes
-----
The Spencer method contains a minus sign discrepancy between
equation 12 of [1]. It's unclear what the correct formula is.
I found the minus sign in reference [1], ran both versions of the formula, and found the plus version to give the smaller error with respect to pyephem. The plus version is also given in Duffie and Beckman, so this comment can be safely removed.