Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Time bands displaying incorrect time on 40min book
(1 viewing) (1) Guest
Universal booking and reservations component for Joomla!.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.
  • Page:
  • 1

TOPIC: Time bands displaying incorrect time on 40min book

Time bands displaying incorrect time on 40min book 11 years, 7 months ago #39153

We have a swimming pool that has some sessions that can be booked in 40 minute time slots, but i can't get them to display correctly in the week booking format. They should display as;

8.00 - 8.40
8.40 - 9.20
9.20 - 10.00
10 - 10.40

but they are displaying as;

8.00 - 8.40
8.40 - 9.20
9.20 - 9.00
9.00 - 10.40

You can see for yourself on this link, www.thetowerhousepool.co.uk/index.php/mo...swimming-pool#caltop

Tried to attach file of admin side, but it wont work.
Last Edit: 11 years, 7 months ago by fraserhannah. Reason: See last sentence
The topic has been locked.

Re: Time bands displaying incorrect time on 40min book 11 years, 7 months ago #39159

  • mach
  • OFFLINE
  • Posts: 112
Hello,
find file /administrator/components/com_booking/helpers/booking.php
Go to the line 1994 and replace function
function floatToTime($value)
{
$hour = floor($value);
$minute = round(($value - $hour) * 60);
var_dump($hour,$minute);
$hour = str_pad($hour, 2, '0', STR_PAD_LEFT);
$minute = str_pad($minute, 2, '0', STR_PAD_LEFT);
if ($minute == 60)
$minute = '00';
return $hour . ':' . $minute;
}

with
function floatToTime($value)
{
$hour = floor($value);
$minute = round(($value - $hour) * 60);
$hour = str_pad($hour, 2, '0', STR_PAD_LEFT);
$minute = str_pad($minute, 2, '0', STR_PAD_LEFT);
if ($minute == 60){
$minute = '00';
$hour++;
}
return $hour . ':' . $minute;
}


It should solve your problems
ARTIO Support Team
The topic has been locked.

Re: Time bands displaying incorrect time on 40min book 11 years, 7 months ago #39167

Thanks, for your help.
The topic has been locked.
  • Page:
  • 1
User Login Empty