original_string: public static function formatTime($format, $time = null){
  
  		if(empty($time)) $time = time();
  
  		// Apply Windows-specific format mapping
  
  		if(PHP_OS == 'WINNT'){
  
  			$mapping = [
  				'%C' => sprintf('%02d', date('Y', $time) / 100),
  				'%D' => '%m/%d/%y',
  				'%e' => sprintf('%\' 2d', date('j', $time)),
  				'%h' => '%b',
  				'%n' => "\n",
  				'%r' => date('h:i:s', $time) . ' %p',
  				'%R' => date('H:i', $time),
  				'%t' => "\t",
  				'%T' => '%H:%M:%S',
  				'%u' => (($w = date('w', $time)) ? $w : 7)
  			];
  
  		   $format = str_replace(array_keys($mapping), array_values($mapping), $format);
  		}
  
  	   return strftime($format, $time);
  	}
code: public static function formatTime($format, $time = null){
  
  		if(empty($time)) $time = time();
  
  		// Apply Windows-specific format mapping
  
  		if(PHP_OS == 'WINNT'){
  
  			$mapping = [
  				'%C' => sprintf('%02d', date('Y', $time) / 100),
  				'%D' => '%m/%d/%y',
  				'%e' => sprintf('%\' 2d', date('j', $time)),
  				'%h' => '%b',
  				'%n' => "\n",
  				'%r' => date('h:i:s', $time) . ' %p',
  				'%R' => date('H:i', $time),
  				'%t' => "\t",
  				'%T' => '%H:%M:%S',
  				'%u' => (($w = date('w', $time)) ? $w : 7)
  			];
  
  		   $format = str_replace(array_keys($mapping), array_values($mapping), $format);
  		}
  
  	   return strftime($format, $time);
  	}
code_tokens: public static function formatTime ( $ format , $ time = null ) { if ( empty ( $ time ) ) $ time = time ( ) ; // Apply Windows-specific format mapping if ( PHP_OS == 'WINNT' ) { $ mapping = [ '%C' => sprintf ( '%02d' , date ( 'Y' , $ time ) / 100 ) , '%D' => '%m/%d/%y' , '%e' => sprintf ( '%\' 2d' , date ( 'j' , $ time ) ) , '%h' => '%b' , '%n' => "\n" , '%r' => date ( 'h:i:s' , $ time ) . ' %p' , '%R' => date ( 'H:i' , $ time ) , '%t' => "\t" , '%T' => '%H:%M:%S' , '%u' => ( ( $ w = date ( 'w' , $ time ) ) ? $ w : 7 ) ] ; $ format = str_replace ( array_keys ( $ mapping ) , array_values ( $ mapping ) , $ format ) ; } return strftime ( $ format , $ time ) ; }
docstring: Format timestamp as a human-readable string.
  
  <p>This method is a wrapper around strftime() and as such accepts all
  {@link $format} strings strftime() accepts. On non-Win32 systems this
  method directly calls strftime(). On Win32 systems it attempts to
  implement most of the formatting options missing from the native Win32
  implementation.</p>
  
  @param string $format
  @param integer $time
  @return string
  @see \strftime()
docstring_tokens: Format timestamp as a human - readable string .