title: How would you represent date of birth in your java model?
body: <p>And wait, don't rush to answer "java.util.Date", consider the following scenario.</p>
  
  <p>Person object having 2 fields: "birthday" and "nextMeeting" both java.util.Date.
  Now birthday stored in database as date type column (no time) for eg. 01-10-1979, and nextMeeting as datetime type for ex. 01-10-2010 20:00:00.</p>
  
  <p>You pull it from db, "birthday" will be auto set to midnight by JDBC.
  Now you need to send this object to other JVM using lets say RMI or whatever technology.</p>
  
  <p>On the other end JVM has timezone -1h from originating JVM. This is where problem starts.
  nextMeeting become 01-10-2010 19:00:00 which is absolutely FINE and CORRECT from user perspective etc...</p>
  
  <p>BUT birthday become 30-09-1979 23:00:00 which will be represented to user as 30th of September, which is really not what we want, cause obviously birthday is something static and NOT dependent on timezones. </p>
  
  <p>So column type in db chosen correctly (date). This type of column usually represented as java.util.Date. But in our case it is wrong java type to use.</p>
  
  <p>So how would you represent a birthday? Consider that you need to manipulate this object on a UI like in a datepicker component etc...</p>