Re: pw_images, UTC, TimeZones, LocalTime
Brought to you by:
iridium
From: Martin G. <gim...@gi...> - 2004-01-05 15:54:25
|
Phil Pierotti <phi...@sw...> writes: > Realistically, for this to be complete and flexible, each ICAO will > need the following information: > - TimeZone specified as offset from GMT > - uses Daylight Savings? > - DST start date > - DST end date > - latitude & longitude > > The sunrise and sunset times can be calculated from the information > from NOAA http://www.srrb.noaa.gov/highlights/sunrise/calcdetails.html Thanks a lot for that link --- we've made an attempt to implement this kind of functionality before, but when I searched the net I only found some messy algorithms that I didn't have much luck with, see http://makeashorterlink.com/?T162215A2 The information on the above page looks much clearer, and it should be easy to port the JavaScript code to PHP --- those two languages are very much alike. > Lat and Long can be had for ICAOs from > http://weather.noaa.gov/tg/site.shtml directly -> > http://weather.noaa.gov/data/nsd_cccc.txt Thanks again --- I've found those datafiles before, but the information is still not part of PHP Weather. Given the latitude and longitude it should be possible to calculate an approximate timezone. And with that timezone we should be able to give a local time for the reports, but I guess it will still be off by +/- 1 hours depending on daylight saving time, so I don't know how good that idea is. It's just that the real solution: attaching detailed information about the daylight saving time to each station, sounds like a difficult task. But then again, there must be some tables with this information somewhere on every system, so perhaps it's doable? In any case --- I'm having my exams right now! The first one will be on Wednesday, so I wont start playing with this stuff now, but if someone else feels like it, then by all mean do! I can add people to the project as developers if they believe they need CVS access. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See http://gimpster.com/ and http://phpweather.net/ for: PHP Weather: Shows the current weather on your webpage and PHP Shell: A telnet-connection (almost :-) in a PHP page. |