[Solved] Show minutes in flight time schedule_briefing.tpl

Hi, actually in my phpvms v2.1.936 I have this code:

schedule_briefing.tpl

\<!-- Flight time Row --\> \<tr\> \<td colspan="2"\>\<?php echo $schedule-\>arrtime - $schedule-\>deptime ?\>\</td\> \</tr\>

But this code not show minutes, only hours, so if I have arr time = 12:59 and dep time = 09:00 the result is 3hours, not 3:59 hours.

How can I fix this?

 

Thanks!

Can’t you just use the following? It’s a bit cleaner too:

\<?php echo $schedule-\>flighttime; ?\>

 

1 Like

Yeah, that is working. Thank you!

By default phpvms2 calculate flightime in this way ($schedule->arrtime - $schedule->deptime) don’t use flightime database column.