The interplanetary spacecraft (SC) expedition from the Earth to Mars with a returning to the Earth optimization problem is considered. The attraction of the Sun only is taken into account. Two trajectories of interplanetary flights of this mission are approximated by Keplerian orbits and are obtained as solutions of Lambert's problems with the use of universal variable, Stumpff functions and Newton's method. The positions and the velocities of the Earth and Mars are calculated with the use of ephemerides DE424. The SC starts from the Earth for the period of 2020-2030 and stay at field near Mars at least for 30 days to carry out near-Mars scientific investigation. The total time of the expedition is limited to 1500 days. The characteristic velocity is minimized. The 64 local minima of this multiextremal problem are found numerically with the use of the gradient method and examined with the second-order optimality conditions with the use of Sylvesters criterion. Each Lambert's problem is given by two moments of time-moments of start and finish of the SC in this statement. So corresponding matrixes are 4 × 4. The subject of the article is actual in connection with the growing interest in the study of other planets of the Solar System and near-planetary spaces, and accordingly the planning of such missions. This study is the first part of the solving optimization problems in more complex statements- namely, a rough global optimization is performed to find potentially optimal time intervals for such missions with the verification of their optimality. The paper describes the method and gives certain results. © 2017 Univelt Inc. All rights reserved.