title: converting one time zone to another using joda time
body: <p>i have made a function to convert from one time zone to another by using joda time but the function is not accepting the date<br>
  i have passed the following parameters to this function <code>"Asia/Kolkata"</code>, <code>"UTC"</code>, <code>"12-Dec-2014 12:30"</code>. It is throwing the following exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: Invalid format: "12-Dec-2014 12:32" is malformed at "-Dec-2014 12:32"
  at org.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)
  at org.joda.time.convert.StringConverter.getInstantMillis(StringConverter.java:65)
  at org.joda.time.base.BaseDateTime.&lt;init&gt;(BaseDateTime.java:150)
  at org.joda.time.DateTime.&lt;init&gt;(DateTime.java:265)
  at Dtime.convertTimeZones(Dtime.java:17)
  at Dtime.main(Dtime.java:9) 
  </code></pre>
  
  <p>Here is the code:</p>
  
  <pre><code>public static String convertTimeZones( String fromTimeZoneString, 
      String toTimeZoneString, String fromDateTime) {
           DateTimeZone fromTimeZone = DateTimeZone.forID(fromTimeZoneString);
           DateTimeZone toTimeZone = DateTimeZone.forID(toTimeZoneString);
           DateTime dateTime = new DateTime(fromDateTime, fromTimeZone);
  
           DateTimeFormatter outputFormatter = 
               DateTimeFormat.forPattern("dd-MMM-yyyy HH:mm").withZone(toTimeZone);
           return outputFormatter.print(dateTime);
  }
  </code></pre>
  
  <p><strong>DST (day light savings )</strong><br>
  i am passing the parameters  as ("<strong>America/Denver</strong>","<strong>GMT</strong>","<strong>09-Mar-2014 02:00</strong>")on this date the <strong>DST</strong> will start<br>
  <strong>for denver</strong><br>
  Sunday, 9 March 2014, 02:00:00 clocks are turned forward 1 hour to<br>
  Sunday, 9 March 2014, 03:00:00 local daylight time instead<br>
  but it is throwing the exception<br>
  <strong>Exception</strong>   </p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse "09-Mar-2014 02:00": Illegal instant due to time zone offset transition (America/Denver)
      at org.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:390)
      at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:849)
      at timeZone.convertTimeZones(timeZone.java:23)
      at timeZone.main(timeZone.java:14)
  </code></pre>