Index PHPmyEasyWeather PHPmyEasyWeather Homepage

getSun

getSun -- return todays time of sunrise/sunset for a given station

Description

Array getSun (string $ICAO);

getSun returns the local time when today sun is rising and going down for a given ICAO station ($ICAO).

getSun returns an Array with 4 indexes: "sunrise", "sunset", "risestamp" and "setstamp" which contain the following values:

If the station is not contained in icao_db, or there is no data provided for longitude, latitude or timezone (these data are not yet provided for all stations in the database) getSun will return false. Then use sunRiseSet instead.

Note: getSun makes use of an approximation technique therefore the returned value may deviate a few - up to 2 or 3 - minutes. Also daylight saving time is not considered.


Previous Up Next