[ phpweather-Bugs-603019 ] get_sky_image()/itime bug (?)
Brought to you by:
iridium
From: <no...@so...> - 2002-09-01 03:03:12
|
Bugs item #603019, was opened at 2002-09-01 03:03 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377952&aid=603019&group_id=23245 Category: Output Group: phpweather-2.x Status: Open Priority: 5 Submitted By: Petteri Kettunen (petterik) Assigned to: Nobody/Anonymous (nobody) 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 = ''; ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377952&aid=603019&group_id=23245 |