Jerry said:
It returns the number of milliseconds since the epoch (which is
midnight Jan 1st 1970 UTC.
The current time means the current UTC time in Milliseconds or the
current OS and Timezone time in Milliseconds?
The answer is "yes" and the javadoc explains that.
The number of milliseconds between epoch and now is the same no matter
what time zone or OS you are using.
The point of reference (epoch) is midnight, January 1st, 1970. The
getTimeInMillis() and setTimeInMillis(long) methods of
java.util.Calendar, java.util.Date, etc. are all returning or looking
for the number of milliseconds from epoch. It does not matter what
timezone you are in because the point of reference (epoch) is always the
same.
Timezone is only an offset to display the current time as understood by
those at a location.
I for one wouldn't mind seeing the elimination of time zones. Who
decided noon has to be the middle of the day? If I am working with
someone in California and I am in Wisconsin and we want to have a
conference call at three o'clock, why must it be asked which three
o'clock we mean? That is what doesn't make sense to me.
DOWN WITH TIMEZONES!!!
