A slight improvement for my last edit, which could trigger a small bug.

I should go out and drink more often, it helps debugging! ;-)
This commit is contained in:
defacer
2005-10-25 01:55:21 +00:00
parent f785985e67
commit 970f144ef4
+3
View File
@@ -502,6 +502,9 @@ function chat_format_message_manually($message, $courseid, $sender, $currentuser
// Use get_user_timezone() to find the correct timezone for displaying this message:
// It's either the current user's timezone or else decided by some Moodle config setting
// First, "reset" $USER->timezone (which could have been set by a previous call to here)
// because otherwise the value for the previous $currentuser will take precedence over $CFG->timezone
$USER->timezone = 99;
$tz = get_user_timezone($currentuser->timezone);
// Before formatting the message time string, set $USER->timezone to the above.