This issue is related to common.inc file where Drupal renders date formats:
In PHP5.1.0 and > we have date format 'e' that give us timezone names but in Drupal's common.inc file code is not handling this character and just prints 'e', so i came up with this solution to add a condition to check if user is not logged-in show them system timezone name and if user is logged-in they will get timezone name from their $user variable $user->timezone_name
here is the code:
else if ($c == 'e') {
if(!$user->uid){
$date .= variable_get('date_default_timezone_name', '');
}
else{
$date .= $user->timezone_name;
}
}
My suggestion is to add this code after line # 1326 , please provide feedback so that if it works fine and make sense then i can attach a patch to this Issue to be committed in next versions
PHP Reference: http://us.php.net/manual/en/function.date.php (See format options)
Comments