Alan Lam пре 2 година
родитељ
комит
9dc2f30dce

+ 3 - 2
template_processing/age_verification_greene_king/test_validate.php

@@ -8,8 +8,9 @@
 use Carbon\CarbonImmutable;
 use Carbon\CarbonImmutable;
 
 
 if($test->dts_start && $test->dts_end) {
 if($test->dts_start && $test->dts_end) {
-	$dt_start = $test->getDateTimeStart();
-	$dt_end = $test->getDateTimeEnd();
+
+	$dt_start = $test->getDateTimeStart()->setTimezone(TIMEZONE);
+	$dt_end = $test->getDateTimeEnd()->setTimezone(TIMEZONE);
 
 
 	$duration = $dt_end->diffInMinutes($dt_start);
 	$duration = $dt_end->diffInMinutes($dt_start);
 
 

+ 4 - 2
views/practice_form.php

@@ -10,6 +10,8 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 <?php
 <?php
 
 
+$user = Core::$user;
+
 if($test->isConfirmed()) {
 if($test->isConfirmed()) {
 	$template->renderBeforeTestForm();
 	$template->renderBeforeTestForm();
 }
 }
@@ -62,14 +64,14 @@ else {
 	<div class="row mb-1">
 	<div class="row mb-1">
 		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(__("Test Start"))?></label>
 		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(__("Test Start"))?></label>
 		<div class="col-sm">
 		<div class="col-sm">
-			<?=htmlspecialchars($test->dts_start)?>
+			<?=htmlspecialchars($user->formatDateTime($test->getDateTimeStart()))?>
 		</div>
 		</div>
 	</div>
 	</div>
 
 
 	<div class="row mb-1">
 	<div class="row mb-1">
 		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(__("Test End"))?></label>
 		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(__("Test End"))?></label>
 		<div class="col-sm">
 		<div class="col-sm">
-			<?=htmlspecialchars($test->dts_end)?>
+			<?=htmlspecialchars($user->formatDateTime($test->getDateTimeEnd()))?>
 		</div>
 		</div>
 	</div>
 	</div>