svn commit: r205437 - user/edwin/calendar
Edwin Groothuis
edwin at FreeBSD.org
Mon Mar 22 07:06:12 UTC 2010
Author: edwin
Date: Mon Mar 22 07:06:12 2010
New Revision: 205437
URL: http://svn.freebsd.org/changeset/base/205437
Log:
Fix UTCoffset adjustments in solar events.
Put a note about the (minimal) differences in solar and lunar events
for communities who need the strict time.
Modified:
user/edwin/calendar/calendar.1
user/edwin/calendar/sunpos.c
Modified: user/edwin/calendar/calendar.1
==============================================================================
--- user/edwin/calendar/calendar.1 Mon Mar 22 06:42:31 2010 (r205436)
+++ user/edwin/calendar/calendar.1 Mon Mar 22 07:06:12 2010 (r205437)
@@ -308,6 +308,10 @@ The new and full moons are happening on
might happen in the time period in the early night or in the late
evening.
It doesn't indicate that they are starting in the night on that date.
+.Pp
+Because of minor differences between the output of the formulas
+used and other sources on the Internet, Druids and Werewolves should
+double-check the start and end time of solar and lunar events.
.Sh BUGS
The
.Nm
Modified: user/edwin/calendar/sunpos.c
==============================================================================
--- user/edwin/calendar/sunpos.c Mon Mar 22 06:42:31 2010 (r205436)
+++ user/edwin/calendar/sunpos.c Mon Mar 22 07:06:12 2010 (r205437)
@@ -102,7 +102,7 @@ sunpos(int inYY, int inMM, int inDD, dou
if (inMM <= 2 && isleap(inYY))
ZJ -= 1.0;
- UTHM = inHOUR + inMIN / FMINSPERHOUR + inSEC / FSECSPERHOUR + UTCOFFSET;
+ UTHM = inHOUR + inMIN / FMINSPERHOUR + inSEC / FSECSPERHOUR - UTCOFFSET;
Y = inYY - 1900; /* 1 */
D = floor(365.25 * Y) + ZJ + inDD + UTHM / FHOURSPERDAY; /* 3 */
T = D / 36525.0; /* 4 */
More information about the svn-src-user
mailing list