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 {
|
||||
$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));
|
||||
$client_time = new DateTimeZone($_COOKIE['tzid']);
|
||||
$datetime->setTimezone($client_time);
|
||||
$displaydate = $datetime->format('D, j M Y H:i T');
|
||||
$displaydate = $datetime->format('D, j M Y H:i');
|
||||
} else {
|
||||
$datetime = new DateTime(date($text_header["date_format"], $date), new DateTimeZone('UTC'));
|
||||
$datetime->add(DateInterval::createFromDateString($offset . ' minutes'));
|
||||
|
|
|
@ -79,9 +79,9 @@ return [
|
|||
'quote_blank_lines' => true,
|
||||
|
||||
// Show timezone converted to local (client) time as
|
||||
// 'offset' (-0400) or 'timezone' (EST)
|
||||
// Default is 'offset', which should be more reliable
|
||||
// as 'timezone' may have issues with daylight savings time
|
||||
// 'offset' (-0400) or 'none' (no timezone display)
|
||||
// Default is 'offset'
|
||||
// 'none' will display NO timezone for dates in articles
|
||||
'timezone_to_local_format' => 'offset',
|
||||
|
||||
// How to format 'who wrote' quoting in reply:
|
||||
|
|
Loading…
Reference in New Issue