#503 Fixed timedelta function so it works with datetime versions we have in appservers