🏡 index : ~doyle/zpan.git

author Jordan Doyle <jordan@doyle.wf> 2016-06-26 14:10:55.0 +01:00:00
committer Jordan Doyle <jordan@doyle.wf> 2016-06-26 14:10:55.0 +01:00:00
commit
94624f04bbeab4a55a634bd80a98f868e12fcf55 [patch]
tree
f0c1ec2b07f9213e22e7aaeecf1012b337dfde31
parent
059af457ab7ca76554cce71012ca8cb7b56cd796
download
94624f04bbeab4a55a634bd80a98f868e12fcf55.tar.gz

Try again to fix off by one



Diff

 app/Http/Controllers/Event/TimetableController.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/Http/Controllers/Event/TimetableController.php b/app/Http/Controllers/Event/TimetableController.php
index b9d7635..528faa6 100644
--- a/app/Http/Controllers/Event/TimetableController.php
+++ a/app/Http/Controllers/Event/TimetableController.php
@@ -242,14 +242,14 @@
            $carbon = Carbon::now()->setISODate(
                Carbon::now()->year,
                Carbon::now()->weekOfYear,
                $slot->day + 1
                $slot->day
            )->setTime($slot->hour, 0)->tz(auth()->check() ? auth()->user()->getTimezone() : 'Europe/London');

            if (Carbon::now()->weekOfYear !== $carbon->weekOfYear) {
                continue;
            }

            $timetable[$carbon->dayOfWeek - 1][$carbon->hour] = [
            $timetable[$carbon->dayOfWeek][$carbon->hour] = [
                'id' => $slot->user()->first()->userid,
                'name' => $raw ? $slot->user()->first()->getDisplayName()->toHtml() :
                    $slot->user()->first()->getDisplayName(),