Changeset 6728

Show
Ignore:
Timestamp:
10/06/08 14:20:43 (6 weeks ago)
Author:
jmathis
Message:

improve GMT use

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/include/monitoring/objectDetails/serviceDetails.php

    r6724 r6728  
    162162                        $tabCommentServices[$i]["is_persistent"] = $en[$tabCommentServices[$i]["is_persistent"]]; 
    163163                } 
    164                 unset($data);    
    165  
    166  
     164                unset($data); 
     165                 
    167166                $en_acknowledge_text = array("1" => _("Delete this Acknowledgement"), "0" => _("Acknowledge this service")); 
    168167                $en_acknowledge = array("1" => "0", "0" => "1"); 
     
    184183                !$service_status[$host_name."_".$svc_description]["check_latency"] ? $service_status[$host_name."_".$svc_description]["check_latency"] = "< 1 second" : $service_status[$host_name."_".$svc_description]["check_latency"] = $service_status[$host_name."_".$svc_description]["check_latency"] . " seconds"; 
    185184                !$service_status[$host_name."_".$svc_description]["check_execution_time"] ? $service_status[$host_name."_".$svc_description]["check_execution_time"] = "< 1 second" : $service_status[$host_name."_".$svc_description]["check_execution_time"] = $service_status[$host_name."_".$svc_description]["check_execution_time"] . " seconds"; 
     185                 
    186186                !$service_status[$host_name."_".$svc_description]["last_notification"] ? $service_status[$host_name."_".$svc_description]["notification"] = "": $service_status[$host_name."_".$svc_description]["last_notification"] = $oreon->CentreonGMT->getDate(_("Y/m/d - H:i:s"), $service_status[$host_name."_".$svc_description]["last_notification"], $oreon->user->getMyGMT()); 
    187                 !$service_status[$host_name."_".$svc_description]["next_notification"] ? $service_status[$host_name."_".$svc_description]["next_notification"] = "": $service_status[$host_name."_".$svc_description]["next_notification"] = $oreon->CentreonGMT->getDate(_("Y/m/d - H:i:s"), $service_status[$host_name."_".$svc_description]["next_notification"], $oreon->user->getMyGMT()); 
     187                 
     188                if (isset($service_status[$host_name."_".$svc_description]["next_notification"]) && !$service_status[$host_name."_".$svc_description]["next_notification"])  
     189                        $service_status[$host_name."_".$svc_description]["next_notification"] = ""; 
     190                else if (!isset($service_status[$host_name."_".$svc_description]["next_notification"])) 
     191                        $service_status[$host_name."_".$svc_description]["next_notification"] = "N/A"; 
     192                else 
     193                        $service_status[$host_name."_".$svc_description]["next_notification"] = $oreon->CentreonGMT->getDate(_("Y/m/d - H:i:s"), $service_status[$host_name."_".$svc_description]["next_notification"], $oreon->user->getMyGMT()); 
     194                 
    188195                !$service_status[$host_name."_".$svc_description]["last_state_change"] ? $service_status[$host_name."_".$svc_description]["duration"] = Duration::toString($service_status[$host_name."_".$svc_description]["last_time_".strtolower($service_status[$host_name."_".$svc_description]["current_state"])]) : $service_status[$host_name."_".$svc_description]["duration"] = Duration::toString(time() - $service_status[$host_name."_".$svc_description]["last_state_change"]); 
    189196                !$service_status[$host_name."_".$svc_description]["last_state_change"] ? $service_status[$host_name."_".$svc_description]["last_state_change"] = "": $service_status[$host_name."_".$svc_description]["last_state_change"] = $oreon->CentreonGMT->getDate(_("Y/m/d - H:i:s"),$service_status[$host_name."_".$svc_description]["last_state_change"], $oreon->user->getMyGMT());