steelerboi Posted May 19, 2009 Report Share Posted May 19, 2009 Hi Nabeel, I was wondering whether it would be possible to change the format used to show total hours flown by an aircraft. I think the issue stems from the time first entered into the PIREP as a non-standard format, e.g. 1.3 for 1 hr 30 mins rather than 1.5 or 90 mins. As such, the total hours flown by one of my aircraft is showing as 3.9 which of course is actually 4 hrs 30 mins. It's not a mega problem, but just one which results in some head scratching when looking at the reports in the admin reports section Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted May 19, 2009 Administrators Report Share Posted May 19, 2009 I think that's probably an issue of the addition not being done correctly. I'll look into it Quote Link to comment Share on other sites More sharing options...
steelerboi Posted June 4, 2009 Author Report Share Posted June 4, 2009 Hi Nabeel, Did you get chance to look into this ? I think it's a combination of the field type in the database and the SUM() query which is adding up flighttime in AircraftStats.class.php. So naturally, if there are two PIREPs with flightime values of 1.4 and 1.3 (i.e. 1 hr 40 and 1 hr 30), the SUM() literally adds them together as 2.7 and this is displayed on the aircrafts reports page in the admin panel. I was thinking perhaps that storing flighttime as minutes would be a possible option, then using code to convert mins to hh:mm on each page where you want the total to be displayed. However, I'm not sure how this would impact other functions which use the value. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted June 4, 2009 Administrators Report Share Posted June 4, 2009 There's code already to do the addition, just need to implement it. Haven't had the time yet though, sorry! 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.