Get GMT Time in Milliseconds using JAVA

mayur rahatekar picture mayur rahatekar · Oct 23, 2012 · Viewed 35k times · Source

Possible Duplicate:
Get GMT Time in Java

I have taken the reference of the below 2 link :

link1 link2

But I want the GMT date in milliseconds.

Thanks In Advance.

Answer

Tobias Ritzau picture Tobias Ritzau · Oct 23, 2012

You can use System.currentTimeMillis() it returns "the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC."

long time = System.currentTimeMillis();

Will do it :)