<?php
$date = "22apr2018 8:36:14.43 # Europe/Oslo CEST";
$t = date_parse( $date );
echo $t['year'], '-', $t['month'], '-', $t['day'], " ";
echo $t['hour'], ':', $t['minute'], ':', $t['second'] + $t['fraction'], " ";
echo $t['tz_id'], "\n";
if ( $t['warning_count'] )
echo "Warnings:\n";
foreach( $t['warnings'] as $pos => $message )
echo "- $message @$pos\n";
if ( $t['error_count'] )
echo "Errors:\n";
foreach( $t['errors'] as $pos => $message )
echo "- $message @$pos\n";