Date: Mon, 22 Mar 2010 07:06:12 +0000 (UTC) From: Edwin Groothuis <edwin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r205437 - user/edwin/calendar Message-ID: <201003220706.o2M76C4I047776@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003220706.o2M76C4I047776>