function gps = ltpdv_server_get_start_time(mainfig)

% Handle
sh = findobj(mainfig, 'Tag', 'LTPDVserverStartEdit');

% Get string
sstr = get(sh, 'String');


if sstr(1) == '+'
   % get start
   start = ltpdv_server_get_stop_time(mainfig);
   gps = start + str2num(sstr(2:end)) -1;
   set(sh, 'String', GPS2UTC(gps));
   return
end
if sstr(1) == '-'
   % get start
   start = ltpdv_server_get_stop_time(mainfig);
   gps = start - str2num(sstr(2:end)) +1;
   set(sh, 'String', GPS2UTC(gps));
   return
end

% Is this GPS?
if ~isempty(sstr)
   try
      gps = eval(sstr);
      utc = GPS2UTC(gps);
   catch
      utc = sstr;
      gps = UTC2GPS(utc);
   end
else
   gps = -1;
end



