TAV1702 Posted March 16, 2013 Report Share Posted March 16, 2013 I am getting a format like : Total Hours Flown: 1400:19:15 I get this on multiple areas of my site. I can deal with the minutes but I would like to loose the seconds. Can anyone point me in the right direction. I made a few edits here and there that I found in that format but nothing changed. Quote Link to comment Share on other sites More sharing options...
Strider Posted March 16, 2013 Report Share Posted March 16, 2013 Post the section of code where it is coming from. Not that easy to know how to fix it without seeing the code first. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted March 17, 2013 Author Report Share Posted March 17, 2013 I took a wild guess and edited a couple areas and it didnt work so not sure I was even in the right place. Ill go back and look. I think that is my problem is I am trying to edit the wrong files or something. Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted March 25, 2013 Author Report Share Posted March 25, 2013 Yeah so I am not figuring this out. I have looked everywhere until I was blue in the face and I am not finding out where the flight times are being pulled from. The time shows up like that in the admin panel dashboard, latest arivals on the front page, and just about everywhere else that has flight times listed. Does anyone know where in the admin files the time is figured up and tossed out on to the site? Maybe it is a module file and not and admin file? Quote Link to comment Share on other sites More sharing options...
TAV1702 Posted March 25, 2013 Author Report Share Posted March 25, 2013 Ok so in the StatsData.class.php I found the following: /** * StatsData::updateTotalHours() * * @return */ public static function updateTotalHours() { $sql = "SELECT SUM(TIME_TO_SEC(flighttime_stamp)) AS `total` FROM `".TABLE_PREFIX."pireps` WHERE `accepted`=".PIREP_ACCEPTED; $totaltime = DB::get_row($sql); if(!$totaltime) { $totaltime = '00:00:00'; } else { $totaltime = Util::secondsToTime($totaltime->total); } SettingsData::SaveSetting('TOTAL_HOURS', $totaltime); } /** * Get the total number of hours flown by pilots */ public static function TotalHours() { return SettingsData::GetSettingValue('TOTAL_HOURS'); } I can see where it is getting the seconds from, editing that does no good. Does anyone have a clue? I am sure the seconds need to be counted to keep an accurate count, but to display on the website is over kill. I would rather it just be hours:minutes i.e. 09:23 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.