Home » Web Services » Services_Weather » Bug #9617
getWeatherIcon always shows night
Details
| Submitted | 2006-12-14 19:07 UTC |
|---|---|
| From | sidkwakkel at hotmail dot com |
| Status | Bogus |
| Package | Services_Weather |
| PHP Version | Irrelevant |
| OS | Linux |
| 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)