PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » Services_Weather » Bug #9617

getWeatherIcon always shows night

Details

Submitted2006-12-14 19:07 UTC
Fromsidkwakkel at hotmail dot com
StatusBogus
PackageServices_Weather
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2006-12-14 19:07 UTC] sidkwakkel at hotmail dot com

Description:
------------
The getWeatherIcon function always shows nighttime icons, even in the middle of the day.

Test script:
---------------
<?php
// include class file
include('Services/Weather.php');

// instantiate object for METAR decoding
$metar = &Services_Weather::service("METAR", array("debug" => 0));
if (Services_Weather::isError($metar)) {
die("Error: ".$metar->getMessage()."\n"); }

$data = $metar->getWeather("CYBW", "Metric");
$icon = $metar->getWeatherIcon($data['condition'], $data['clouds'], $data['wind'], $data['temperature']);
?>

Expected result:
----------------
In the middle of the day, should show a sun if it's sunny.

Actual result:
--------------
shows a moon (33.png)