From 88221c2f6751bc983a268cf21d5ddf39e8be515d Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 10 Aug 2004 01:30:09 +0000 Subject: #7646 and more: - Users who have not edited their account yet would be reset to GMT rather than the sitewide timezone. - Users who chose GMT (zero timezone) on a site with a non-zero timezone as default would have incorrect timezone. --- includes/common.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'includes') diff --git a/includes/common.inc b/includes/common.inc index 2f5df9e48..feab010d2 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -915,7 +915,12 @@ function format_interval($timestamp, $granularity = 2) { function format_date($timestamp, $type = 'medium', $format = '', $timezone = NULL) { if ($timezone === NULL) { global $user; - $timezone = $user->uid ? $user->timezone : variable_get('date_default_timezone', 0); + if (variable_get('configurable_timezones', 1) && $user->uid && strlen($user->timezone)) { + $timezone = $user->timezone; + } + else { + $timezone = variable_get('date_default_timezone', 0); + } } $timestamp += $timezone; -- cgit v1.2.3