From owner-freebsd-stable@FreeBSD.ORG Thu Oct 9 23:18:41 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EF5E1065692 for ; Thu, 9 Oct 2008 23:18:41 +0000 (UTC) (envelope-from peter@wemm.org) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.174]) by mx1.freebsd.org (Postfix) with ESMTP id 20B338FC17 for ; Thu, 9 Oct 2008 23:18:40 +0000 (UTC) (envelope-from peter@wemm.org) Received: by wf-out-1314.google.com with SMTP id 24so366784wfg.7 for ; Thu, 09 Oct 2008 16:18:40 -0700 (PDT) Received: by 10.143.3.4 with SMTP id f4mr382752wfi.233.1223594320513; Thu, 09 Oct 2008 16:18:40 -0700 (PDT) Received: by 10.142.255.21 with HTTP; Thu, 9 Oct 2008 16:18:40 -0700 (PDT) Message-ID: Date: Thu, 9 Oct 2008 16:18:40 -0700 From: "Peter Wemm" To: "Andrew D" In-Reply-To: <48EDE8DC.8030108@webzone.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <884679.22561.qm@web110112.mail.gq1.yahoo.com> <48E75BB7.2060206@madpilot.net> <20081009145337.P16723@sola.nimnet.asn.au> <48EDE8DC.8030108@webzone.net.au> Cc: FreeBSD Stable , Ian Smith Subject: Re: sidetrack [was Re: 'at now' not working as expected] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2008 23:18:41 -0000 On Thu, Oct 9, 2008 at 4:19 AM, Andrew D wrote: > Hi Ian, > > Ian Smith wrote: >> >> On Wed, 8 Oct 2008, Peter Wemm wrote: >> [..] >> > My tolerance for hacking at(1) code was exceeded when I added hacks >> > for 'at sunrise' and 'at sunset' support to a local version. It >> > wasn't pretty, especially when handling things like '30 minutes before >> > sunrise' etc. (I use this for home automation stuff) >> >> Peter, just curious .. from where do you pull the current sunrise/sunset >> info for your location, and in what form? >> > > In Australia, you get it from Geoscience Australia. > > http://www.ga.gov.au/geodesy/astro/sunrise.jsp > > Just need a few curl queries and then extract the required info from the > html source :) I just calculate it from my lat/lon. Its not particularly hard. I found a bunch of massively over-complicated code examples (mostly in javascript, or worse) that usually was GPL'ed. I ended up finding the original public domain code that was written in basic and did a simple conversion of that. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell