From owner-svn-src-user@FreeBSD.ORG Mon Mar 22 07:06:12 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2045106564A; Mon, 22 Mar 2010 07:06:12 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A11328FC13; Mon, 22 Mar 2010 07:06:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2M76CKN047779; Mon, 22 Mar 2010 07:06:12 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2M76C4I047776; Mon, 22 Mar 2010 07:06:12 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201003220706.o2M76C4I047776@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 22 Mar 2010 07:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205437 - user/edwin/calendar X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Mar 2010 07:06:12 -0000 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 */