What then is time? If no one asks me, I know: if I wish to explain it to one that asketh, I know not. Augustine of Hippo.
The first thing to model is time itself. We have to decide how we want to view time in the problem domain.
We have all learned time as absolute and as continuous flowing when studying Newtonian theories of gravity and motion. Later Einstein created the idea that time is relative. However Augustine of Hippo thougt about past, future and the present as the boundary between the two. And time is what separates cause and effect.
To build computer applications we also have to consider how we measure time in the problem domain. In a social security application you work with days, for example startdate and enddate of a job someone held, or days a person was reported sick. In a train schedule however you typically work with minutes. And if you are in Switzerland the trains in fact leave exactly when the hand strikes the minute.
In temporal applications we usually work with discrete units of time.
It doesn't matter whether we take days month or milliseconds.
We shall work with the joda-time library, which has milliseconds as finest grained scale. The library provides a class for dates represented with midnight as start-time. So date an millisecond we get for free. For the rest you have to roll your own.