Browse files

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

I should go out and drink more often, it helps debugging! ;-)
  • Loading branch information...
1 parent f785985 commit 970f144ef42e578e006d53194cfd6e0b6ed658f4 defacer committed Oct 25, 2005
Showing with 3 additions and 0 deletions.
  1. +3 −0 mod/chat/lib.php
@@ -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.

0 comments on commit 970f144

Please sign in to comment.