Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

System.currentTimeMillis() returns time in UTC or not??????

807589Sep 19 2008 — edited Sep 22 2008
Hello Friends,

I want to know that "System.currentTimeMillis()" returns time in UTC or Current Local time

ie suppose i set my TimeZone (GMT+ 2)

then statement gives me value in milliseconds by adding 2 hours to the GMT(Is this value should consider as UTC time or we have to subtract and add offset value according to the timezone.

If time value return by statement is in local time and this is not UTC then is there is any provision in Java to convert local time into UTC time ??


Regards
Gaurav
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2008
Added on Sep 19 2008
11 comments
2,593 views