I had to do this the long way. Means parsing the date with a regex and using mktime() to get a unix timestamp. In PHP it looks like this:
// our date in oracle-style
$orcl_date = "22-MAY-13 12.00.00.000000 AM";
// painfully extract date related parts
preg_match( '/^(\d{2})-(\w{3})-(\d{2})\s(\d{2})\.(\d{2})\.(\d{2})\.(\d{6})\s(AM|PM)/' , $orcl_date , $matches );
@list( $all , $day , $month , $year , $hour , $minute , $sec , $minisec , $ampm ) = $matches;
// do AM/PM illogical behaviour
if ( $ampm == 'AM' ) { // 12 AM (midnight) will result in zero.
if ( $hour == 12 )
$hour -= 12;
} else {
if ( $hour != 12 ) // 12 pm (high noon)
$hour += 12;
}
$month = array_search( $month , array("","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEZ" ) );
// oracle does not give us any information about the century. We assume that it's the current one.
$year += 2000;
// make a unix timestamp.
$timestamp = mktime( $hour , $minute , $sec , $month , $day , $year );
$result = strftime('%Y-%m-%d %H:%M:%S',$timestamp);