public int stringToTime(String lastTime) {

		StringBuilder sb = new StringBuilder();
		for(int i = 0; i < lastTime.length(); i++) {
			char c = lastTime.charAt(i);
			if(c >= '0' && c <= '9')
				sb.append(c);
			else 
				sb.append(' ');
			if(c == '-')
				System.err.println(lastTime);
		}
		
		String ints[] = sb.toString().split("\\s+");
		int sec = 0;
		for(int i = 0; i < ints.length; i++) {
			if(!ints[i].isEmpty())
				sec += sec * 60 + Integer.parseInt(ints[i]);
		}
		return sec;
	}