Remove timezone from date display if known and can display in user's time.
This commit is contained in:
parent
96f62762d6
commit
cfc4b35892
|
@ -1431,11 +1431,11 @@ function get_date_for_client_timezone($date)
|
||||||
} else {
|
} else {
|
||||||
$offset = intval($CONFIG['timezone']);
|
$offset = intval($CONFIG['timezone']);
|
||||||
}
|
}
|
||||||
if (isset($_COOKIE['tzid']) && (isset($OVERRIDES['timezone_to_local_format']) && $OVERRIDES['timezone_to_local_format'] == 'timezone')) {
|
if (isset($_COOKIE['tzid']) && (isset($OVERRIDES['timezone_to_local_format']) && $OVERRIDES['timezone_to_local_format'] == 'none')) {
|
||||||
$datetime = new DateTime(date($text_header["date_format"], $date));
|
$datetime = new DateTime(date($text_header["date_format"], $date));
|
||||||
$client_time = new DateTimeZone($_COOKIE['tzid']);
|
$client_time = new DateTimeZone($_COOKIE['tzid']);
|
||||||
$datetime->setTimezone($client_time);
|
$datetime->setTimezone($client_time);
|
||||||
$displaydate = $datetime->format('D, j M Y H:i T');
|
$displaydate = $datetime->format('D, j M Y H:i');
|
||||||
} else {
|
} else {
|
||||||
$datetime = new DateTime(date($text_header["date_format"], $date), new DateTimeZone('UTC'));
|
$datetime = new DateTime(date($text_header["date_format"], $date), new DateTimeZone('UTC'));
|
||||||
$datetime->add(DateInterval::createFromDateString($offset . ' minutes'));
|
$datetime->add(DateInterval::createFromDateString($offset . ' minutes'));
|
||||||
|
|
|
@ -78,12 +78,12 @@ return [
|
||||||
// Default is true
|
// Default is true
|
||||||
'quote_blank_lines' => true,
|
'quote_blank_lines' => true,
|
||||||
|
|
||||||
// Show timezone converted to local (client) time as
|
// Show timezone converted to local (client) time as
|
||||||
// 'offset' (-0400) or 'timezone' (EST)
|
// 'offset' (-0400) or 'none' (no timezone display)
|
||||||
// Default is 'offset', which should be more reliable
|
// Default is 'offset'
|
||||||
// as 'timezone' may have issues with daylight savings time
|
// 'none' will display NO timezone for dates in articles
|
||||||
'timezone_to_local_format' => 'offset',
|
'timezone_to_local_format' => 'offset',
|
||||||
|
|
||||||
// How to format 'who wrote' quoting in reply:
|
// How to format 'who wrote' quoting in reply:
|
||||||
// 'On 4, Jan 2024, John Doe wrote:'
|
// 'On 4, Jan 2024, John Doe wrote:'
|
||||||
// Options are:
|
// Options are:
|
||||||
|
|
Loading…
Reference in New Issue