Changeset 189 for trunk/web/addons/toga/host_view.php
- Timestamp:
- 08/05/05 12:55:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/addons/toga/host_view.php
r149 r189 6 6 //$tpl->prepare(); 7 7 8 function datetimeToEpoch( $datetime ) { 9 10 //printf("datetime = %s\n", $datetime ); 11 $datetime_fields = explode( ' ', $datetime ); 12 13 $date = $datetime_fields[0]; 14 $time = $datetime_fields[1]; 15 16 $date_fields = explode( '-', $date ); 17 18 $days = $date_fields[0]; 19 $months = $date_fields[1]; 20 $years = $date_fields[2]; 21 22 //printf( "days = %s months = %s years = %s\n", $days, $months, $years ); 23 24 $time_fields = explode( ':', $time ); 25 26 $hours = $time_fields[0]; 27 $minutes = $time_fields[1]; 28 $seconds = $time_fields[2]; 29 30 //printf( "hours = %s minutes = %s seconds = %s\n", $hours, $minutes, $seconds ); 31 32 $timestamp = mktime( $hours, $minutes, $seconds, $months, $days, $years ); 33 34 //printf( "timestamp = %s\n", $timestamp ); 35 36 return $timestamp; 37 } 8 38 9 39 function makeHostView() { … … 24 54 $tpl->assign("sort",$sort); 25 55 $tpl->assign("range",$range); 56 57 if( !is_numeric( $period_start ) ) { 58 $period_start = datetimeToEpoch( $period_start ); 59 } 60 if( !is_numeric( $period_stop ) ) { 61 $period_stop = datetimeToEpoch( $period_stop ); 62 } 26 63 27 64 if($hosts_up)
Note: See TracChangeset
for help on using the changeset viewer.