Changeset 1498 for branches/3.0

Show
Ignore:
Timestamp:
11/18/2006 06:18:00 PM (2 years ago)
Author:
wei
Message:

Fix #453

Location:
branches/3.0
Files:
3 added
2 modified

Legend:

Unmodified
Added
Removed
  • branches/3.0/framework/I18N/core/DateFormat.php

    r1397 r1498  
    111111        public function format($time, $pattern='F', $charset='UTF-8') 
    112112        { 
    113                 if(is_string($time)) 
     113                if (is_numeric($time)) //assumes unix epoch 
     114                        $time = floatval($time); 
     115                else if(is_string($time)) 
    114116                        $time = @strtotime($time); 
    115117 
     
    117119                        $pattern = 'F'; 
    118120 
    119                 $date = @getdate($time); 
     121                $s = Prado::createComponent('System.Util.TDateTimeStamp'); 
     122 
     123                $date = $s->getDate($time); 
    120124 
    121125                $pattern = $this->getPattern($pattern); 
  • branches/3.0/framework/Util/TDateTimeStamp.php

    r1397 r1498  
    194194                return $this->_getDateInternal($d); 
    195195        } 
     196 
     197 
    196198 
    197199        /**