title: read time from text file in java
body: <p>I am trying to write some codes in java to read a text file, but when it read a time in (hh:mm) formate as example below:</p>
  
  <pre><code>6:30 14:30
  </code></pre>
  
  <p>and there is my java code to convert the string to Data formate</p>
  
  <pre><code>DateFormat formatter = new SimpleDateFormat("hh:mm");
  strLine = br.readLine();
  strLine = strLine.trim();
  tokens2 = strLine.split(" ");
  System.out.println((Date)formatter.parse(tokens2[0]));
  </code></pre>
  
  <p>the output will be:</p>
  
  <pre><code>Thu Jan 01 06:30:00 AST 1970
  </code></pre>
  
  <p>it will give in long formate Date , While I want just take timezone(06:30).
  what should I do ?
  Any advice.</p>
  
  <p>edit: the problem solved by Joda time by this code:</p>
  
  <pre><code>LocalTime.parse(tokens2[0]);
  </code></pre>
  
  <p>it is just take time</p>