refactor: use variable DEFAULT_TIMEZONE
This commit is contained in:
@@ -160,12 +160,12 @@ setSecurityHeaders();
|
||||
<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'
|
||||
);
|
||||
@@ -195,7 +195,7 @@ setSecurityHeaders();
|
||||
'fr_FR',
|
||||
IntlDateFormatter::FULL,
|
||||
IntlDateFormatter::SHORT,
|
||||
'Indian/Reunion'
|
||||
DEFAULT_TIMEZONE
|
||||
);
|
||||
echo $formatter->format($liveDate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user