2007-08-06 Sancho Lerena <slerena@gmail.com>

* DB.pm: Alert time support uses TIME format instead numeric (changes requested
        by esanchezm).



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@592 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-08-06 15:48:57 +00:00
parent 3a8d97d7a7
commit a82dd59eb3
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-08-06 Sancho Lerena <slerena@gmail.com>
* DB.pm: Alert time support uses TIME format instead numeric (changes requested
by esanchezm).
2007-08-02 Sancho Lerena <slerena@gmail.com> 2007-08-02 Sancho Lerena <slerena@gmail.com>
* Makefile.PL: Missing dep updated and .pl extensions purged. * Makefile.PL: Missing dep updated and .pl extensions purged.

View File

@ -137,10 +137,10 @@ sub pandora_calcula_alerta (%$$$$$$) {
my $alert_timeto = $data[19]; my $alert_timeto = $data[19];
my $ahora_hour = &UnixDate("today","%H"); my $ahora_hour = &UnixDate("today","%H");
my $ahora_min = &UnixDate("today","%M"); my $ahora_min = &UnixDate("today","%M");
my $ahora_time = $ahora_hour.":".$ahora_min;
# time check ! # time check !
if ( (((($ahora_hour * 60)+$ahora_min) >= ($alert_timefrom * 30)) && if ((($ahora_time le $alert_timeto) && ($ahora_time ge $alert_timefrom)) || ($alert_timefrom eq $alert_timeto)){
((($ahora_hour * 60)+$ahora_min) <= ($alert_timeto * 30))) || ($alert_timefrom == $alert_timeto)) {
my $comando =""; my $comando ="";
logger($pa_config, "Found an alert defined for $nombre_modulo, its ID $id_alerta",4); logger($pa_config, "Found an alert defined for $nombre_modulo, its ID $id_alerta",4);
# Here we process alert if conditions are ok # Here we process alert if conditions are ok