Q:

JodaTime convert from Java.util.Date to DateTime (or LocalDate)

I'm running into a problem when I construct a DateTime (or LocalDate).  I'm converting old code to use joda internally to make things more sane.  However I'm running into the +1900 issue...
This passes:
assertEquals(2082, new Date(2082, 1, 1).getYear());

These both fail:
assertEquals(2083, new LocalDate(new Date(2083, 1, 1)).getYear());
assertEquals(2084, new DateTime(new Date(2084, 1, 1)).toLocalDateTime().getYear());

What's going on here?  How do I get a DateTime from a Date object?

A:

From javadoc for java.util.Date(int year, int month, int date):

Deprecated. As of JDK version 1.1, replaced by Calendar.set(year +
  1900, month, date) or GregorianCalendar(year + 1900, month, date).
Allocates a Date object and initializes it so that it represents
  midnight, local time, at the beginning of the day specified by the
  year, month, and date arguments. 
Parameters: year the year minus 1900. month the month between 0-11.
  date the day of the month between 1-31.

Besides the fact that it states that the years argument is an offset from the year 1900, you should not be using this constructor as it's deprecated. Instead, use java.util.Calendar:
Calendar cal = Calendar.getInstance();
cal.set(2083, 1, 1);
assertEquals(2083, new LocalDate(cal).getYear());

A:

Your code is fine.
You get confusing results because constructor of Date and its getYear() method work with 1900-based years, that's why they are deprecated.
Also note that conversion from Date to LocalDate / LocalDateTime requires a timezone and uses the default one if none is given explicitly.

