Without code, I don't think I can be much help. A few things I would watch for:
1) You don't do any 'date math' with the Date object itself, or the long that gets returned from getTime()
2) You don't inadvertently store the time as an int value rather than a long value
3) You server uses its own internal clock to generate time stamps (doesn't get it from clients) and its clock is properly set
4) The Time Stamps you get from your database are properly formatted (stored and retrieved appropriately for how you view them).
It is not inconceivable that a DB has a different idea as to how dates/timestamps should be stored, and that idea is in-appropriate for what
Java expects. Read the docs for the commands you give the DB just to be sure that they are what you expect. Look at how the dates get added, how they get stored and how they get retrieved. Then compare that with the method Java uses to work with the dates.