Changeset 2bf3cc6 in github


Ignore:
Timestamp:
Jun 13, 2010 6:15:25 AM (3 years ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
984e3db9
Parents:
0133e6b
Message:
  • Use user's timezone in Date header, not server's timezone (#1486119)
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r5852c14d r2bf3cc6  
    22=========================== 
    33 
     4- Use user's timezone in Date header, not server's timezone (#1486119) 
    45- Add option to set separate footer for HTML messages (#1486660) 
    56- Add real SMTP error description to displayed error messages (#1485927) 
  • program/steps/mail/func.inc

    r64e3e80 r2bf3cc6  
    14791479    // compose headers array 
    14801480    $headers = array( 
    1481       'Date' => date('r'), 
     1481      'Date' => rcmail_user_date(), 
    14821482      'From' => $sender, 
    14831483      'To'   => $message->headers->mdn_to, 
     
    15231523  return false; 
    15241524} 
     1525 
     1526// Returns RFC2822 formatted current date in user's timezone 
     1527function rcmail_user_date() 
     1528{ 
     1529  global $CONFIG; 
     1530 
     1531  // get user's timezone 
     1532  if ($CONFIG['timezone'] === 'auto') { 
     1533  console($_SESSION['timezone']); 
     1534    $tz = isset($_SESSION['timezone']) ? $_SESSION['timezone'] : date('Z')/3600; 
     1535  } 
     1536  else { 
     1537    $tz = $CONFIG['timezone']; 
     1538    if ($CONFIG['dst_active']) 
     1539      $tz++; 
     1540  } 
     1541 
     1542  $date = time() + $tz * 60 * 60; 
     1543  $date = gmdate('r', $date); 
     1544  $date = preg_replace('/[+-][0-9]{4}$/', sprintf('%+05d', $tz * 100), $date); 
     1545 
     1546  return $date; 
     1547} 
     1548 
    15251549 
    15261550function rcmail_search_filter($attrib) 
  • program/steps/mail/sendmail.inc

    r5852c14d r2bf3cc6  
    288288} 
    289289 
    290 $headers['Date'] = date('r'); 
     290$headers['Date'] = rcmail_user_date(); 
    291291$headers['From'] = rcube_charset_convert($identity_arr['string'], RCMAIL_CHARSET, $message_charset); 
    292292$headers['To'] = $mailto; 
Note: See TracChangeset for help on using the changeset viewer.