title: java: Calendar dont get correct date / time?
body: <p>i use this code to convert a date-string into a unix timestamp:</p>
  
  <pre><code>int year = 2012;
  int month = 2; // eg. for march
  int day = 31;
  int hrs = 0;
  int min = 18;
  </code></pre>
  
  <p>this should represant this date/time 31.3.2012 00:18 or 3/31/2012 00:18 in english notation </p>
  
  <pre><code>Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("Europe/Berlin")); // GMT+1
  cal.set(year, month, day, hrs, min);
  unixtime = cal.getTimeInMillis() / 1000;
  </code></pre>
  
  <p>The result of unixtime is: <code>1333145929</code>
  If i convert it back (<code>cal.setTimeInMillis(1333145929 * 1000);</code>) i got <code>30.3.2012 00:18</code> </p>
  
  <p>I lost one day!</p>