summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2004-08-10 01:30:09 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2004-08-10 01:30:09 +0000
commit88221c2f6751bc983a268cf21d5ddf39e8be515d (patch)
tree217883593ba7e6a6aad753de4d237f5669990d69 /includes
parentd6a91bddcf30884441667fe87936e7b34769c713 (diff)
downloadbrdo-88221c2f6751bc983a268cf21d5ddf39e8be515d.tar.gz
brdo-88221c2f6751bc983a268cf21d5ddf39e8be515d.tar.bz2
#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.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc7
1 files changed, 6 insertions, 1 deletions
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;