Changeset 5732 in subversion


Ignore:
Timestamp:
Jan 6, 2012 5:43:05 AM (17 months ago)
Author:
alec
Message:
  • Don't return 'unknown', use empty string, DateTime?* handle more exceptions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/main.inc

    r5731 r5732  
    10671067  } 
    10681068  catch (Exception $e) { 
    1069     return 'unknown'; 
     1069    return ''; 
    10701070  } 
    10711071 
     
    18871887 
    18881888  // get user's timezone 
    1889   $tz = new DateTimeZone($RCMAIL->config->get('timezone')); 
    1890  
    1891   $date = new DateTime('now', $tz); 
     1889  try { 
     1890    $tz   = new DateTimeZone($RCMAIL->config->get('timezone')); 
     1891    $date = new DateTime('now', $tz); 
     1892  } 
     1893  catch (Exception $e) { 
     1894    $date = new DateTime(); 
     1895  } 
     1896 
    18921897  return $date->format('r'); 
    18931898} 
Note: See TracChangeset for help on using the changeset viewer.