Not sure what you have in $lastLine.LastLine, but assuming it is the last line fo the vmkernel log, can you try casting with DateTime?
You do not have to drop the 'Z' at the end, rather split on the blank.
$lastDateTime = [DateTime]($lastLine.LastLine.Split(' ')[0])
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference