Scrap my own code, use a sunrise/sunset lib.  Don't want to succumb to NIH syndrome anyway.