When attempting to calculate the equation of time using the U.S. Naval Observatory's algorithm, I end up with the value "300.4580026457396". But what sort of number is this? The value I'm aiming for is 10:23 on 1 Oct 2011 12:00 (+01:00).
Here's how I got it:
suns_mean_longitude / 15 - suns_right_ascension
Is this the number of days since the start of the year? If so, is this how I'd get the value I'm aiming for?
2011-01-01 00:00:00 UTC + suns_mean_longitude / 15 - suns_right_ascension * 60 * 60 * 24
This calculation, however, gives me 2011-10-28 10:59:31 UTC, not 2011-10-01 10:23:00 UTC as expected.
So am I doing the right thing, did I mess up some other part of my algorithm?
https://gist.github.com/1278755
Thanks!
--Dwayne
The whole part, 300, represents the day of the year. The fractional part is the fraction of the day into that particular day, representing 10:23 AM. Leap years affect this calculation, as well.
Here is a site to help you with day of calendar calculations.