You can get approximate lat and long if you know the zip code. Their is a free download of zip codes with lat and long database on the inter tubes.
Julian On Sat, Nov 22, 2014 at 10:17 PM, Michael R. Davis via Houston < [email protected]> wrote: > Perl Mongers, > > > or something fancier if you have a daytime/nighttime script > > 0-59/10 * * * * is_nighttime && power-outlet iBoot ON host mylamp > > 5-59/10 * * * * is_daytime && power-outlet iBoot OFF host mylamp > > I'm finally putting plan to code and I ran into an issue that there does > not appear to be a standard for the location of a system. In order to > calculate the sunset and sunrise for my is_nighttime/is_daytime scripts, I > need to know the location of the host. Please let me know if you know of > any system location standards for something that I feel should be > ubiquitous. > > For now, I'm planning to add a file to /etc/profiles.d to add this > environment variable for the users on my server. > > my ($lon, $lat, $hae) = split(/\s/, > $ENV{"LOCATION_COORDINATES_WGS84_LON_LAT_HAE"}||""); > > It might be nice to populate it from data stored in a > /etc/local.coordinates file or something. From my perspective, knowing > your location is as important as knowing your time zone (e.g. > /etc/localtime) > > /etc/local.coordinates > [main] > version=1 > crs=wgs84 > latitude=38.896783 > longitude=-77.036509 > hae=30 > address=1600 Pennsylvania Avenue NW, Washington, DC > > Any comments? > Thanks, > Mike > > _______________________________________________ > Houston mailing list > [email protected] > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ >
_______________________________________________ Houston mailing list [email protected] http://mail.pm.org/mailman/listinfo/houston Website: http://houston.pm.org/
