Bugs item #603019, was opened at 2002-09-01 03:03
Message generated for change (Comment added) made by iridium
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377952&aid=603019&group_id=23245
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Output
Group: phpweather-2.x
Status: Open
>Priority: 2
Submitted By: Petteri Kettunen (petterik)
>Assigned to: Kevin Cornwell (kcornwell)
Summary: get_sky_image()/itime bug (?)
Initial Comment:
The night flag in pw_images.php is set according to metar
timestamp. Consider that you want to show sky image
according to local time. In embedded script one can make
the following hook:
sscanf(gmdate('G', $data['time'] + 32400), "%d", $hour);
if (($hour < 6) || ($hour > 18)) {
$images->set_time('nite');
} else {
$images->set_time('day');
}
$img = $images->get_sky_image();
But then one should also change in pw_images.php/
get_sky_image():
// if itime var is set by user, it overrides night flag
if ($this->itime != '') {
if ($this->itime == 'nite') {
$night = 1;
} else {
$night = 0;
}
}
if ($night == 1) {
return $this->properties['icons_path'] .
$this->n_images[$phenomena_group][$maxcoverage];
} else {
return $this->properties['icons_path'] .
$this->images[$phenomena_group][$maxcoverage];
}
// null itime????
// $this->itime = '';
----------------------------------------------------------------------
>Comment By: Max Hammond (iridium)
Date: 2006-09-10 09:40
Message:
Logged In: YES
user_id=81516
dup 597732
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=377952&aid=603019&group_id=23245
|