Possible Duplicate:
System.currentTimeMillis() vs. new Date() vs. Calendar.getInstance().getTime()
I have just come across this in some legacy code:
GregorianCalendar.getInstance().getTime().getTime()
This just seems like a very circuitous way of calling System.currentTimeInMillis()
.
The server that this code runs on is probably running in a timezone other than UTC, but looking at the source of Date.getTime() everything will be GMT-based anyway (yes, I know that GMT doesn't precisely equal UTC).
Could there be a benefit I'm not aware of?