refactor: use variable DEFAULT_TIMEZONE

This commit is contained in:
2025-10-08 20:52:40 +04:00
parent f1f056f7f3
commit 04a7e4c6eb
6 changed files with 16 additions and 8 deletions
+3 -3
View File
@@ -170,12 +170,12 @@ $liveStream = getLiveStream();
<i class="fas fa-calendar-alt"></i>
<?php
if (!empty(NEXT_LIVE_DATE)) {
$liveDate = new DateTime(NEXT_LIVE_DATE, new DateTimeZone('Indian/Reunion'));
$liveDate = new DateTime(NEXT_LIVE_DATE, new DateTimeZone(DEFAULT_TIMEZONE));
$dayFormatter = new IntlDateFormatter(
'fr_FR',
IntlDateFormatter::FULL,
IntlDateFormatter::NONE,
'Indian/Reunion',
DEFAULT_TIMEZONE,
IntlDateFormatter::GREGORIAN,
'EEEE d MMMM'
);
@@ -205,7 +205,7 @@ $liveStream = getLiveStream();
'fr_FR',
IntlDateFormatter::FULL,
IntlDateFormatter::SHORT,
'Indian/Reunion'
DEFAULT_TIMEZONE
);
echo $formatter->format($liveDate);