06.20 php saved
candybar
Tags add more
 
Note
I put this in my app_model to format times appropriately.
  1. /**
  2. * @todo Document User::_dbFormatter()
  3. */
  4.     function _dbFormatter($time, $type = 'datetime') {
  5.         $validTypes = array('datetime', 'timestamp', 'time', 'date');
  6.         if(!in_array($type, $validTypes)) {
  7.             trigger_error('Invalid type: ' . $type);
  8.             return false;
  9.         }
  10.         $db =& ConnectionManager::getDataSource($this->useDbConfig);
  11.         return $db->columns[$type]['formatter']($db->columns[$type]['format'], $time);
  12.     }
Parsed in 0.026 seconds, using GeSHi 1.0.7.14

Modify this Paste