Skip to content

Commit

Permalink
Merge pull request #318 from HZ-HBO-ICT/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
eliotolhoek authored Oct 16, 2023
2 parents 658b008 + 7260b41 commit 2f235d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/Models/Presentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ public function handleApproval(bool $isApproved) : void
protected function speakerCanEdit() : Attribute
{
$currentDate = Carbon::now();
$deadline = Carbon::createFromDate($currentDate->year, 10, 12);
$deadline = Carbon::createFromDate($currentDate->year, 10, 27);
$deadline->setTime(12, 0, 0);
$deadline->setTimezone('Europe/Amsterdam');

return Attribute::make(
get: fn() => $currentDate->lt($deadline)
Expand Down
4 changes: 3 additions & 1 deletion app/Policies/PresentationPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ class PresentationPolicy
public function request(User $user): bool
{
$currentDate = Carbon::now();
$deadline = Carbon::createFromDate($currentDate->year, 10, 12);
$deadline = Carbon::createFromDate($currentDate->year, 10, 27);
$deadline->setTime(12, 0, 0);
$deadline->setTimezone('Europe/Amsterdam');

// If the deadline for the 12th of October has passed
if ($currentDate->gt($deadline)) {
Expand Down

0 comments on commit 2f235d4

Please sign in to comment.