title: Parsing date with Joda with time zone
body: <p>I have two timestamps which describe the same instant of time in two different formats.</p>
  
  <p><code>2010-10-03 18:58:07</code> and <code>2010-10-03T16:58:07.000+02:00</code>.</p>
  
  <p>I parse the timestamps with two different date formatters with Joda-Time. In the end I want to have two DateTime objects that are equal in terms of being the same instant of time.</p>
  
  <p>The DateFormatter offers several methods to control time zones and locales but i couldn't get it to work. </p>
  
  <p>This is the code that i would like to work:</p>
  
  <pre><code>    final String date1 = "2010-10-03 18:58:07"; // Europe/Berlin local time
      final DateTimeFormatter formatter1 = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
      final DateTime dateTime1 = formatter1.parseDateTime(date1);
  
      final String date2 = "2010-10-03T16:58:07.000+02:00"; // Europe/Berlin local time with time zone
      final DateTimeFormatter formatter2 = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
      final DateTime dateTime2 = formatter2.parseDateTime(date2);
  
      Assert.assertTrue(dateTime1.isEqual(dateTime2));
  </code></pre>