I have read many answers on similar question but still can't understand the whole logic. My aim is to handle date (including time, not just year month etc) inside of my application and consider the daylight savings time shift and server's timezone as well. I am using hibernate and postgresql db. My mistake was to use java.util.Date type for all the dates coming from DB. Soon I realized that it doesn't contain timezone information. Now the question arises, how to use correct Date (daylight and timezone considered)?
What would be the correct way to do it? Using different type of class such as Calendar? Or just leave it as it is but at every place where I use Date I should convert it to local timezone with Calendar for example?
What makes me confused is how the date comes from db into the Date object and if its safe to convert that Date object to Calendar to include timezone etc.?