sidetrack [was Re: 'at now' not working as expected]

Peter Wemm peter at
Thu Oct 9 23:18:41 UTC 2008

On Thu, Oct 9, 2008 at 4:19 AM, Andrew D <andrewd at> 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.
> 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 at; peter at; peter at; 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

More information about the freebsd-stable mailing list