Does System.currentTimeMillis() represent UTC time or local system time?
Does System.currentTimeMillis() represent UTC time or local system time?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
UTC – it’s the number of milliseconds since midnight on January 1st 1970 UTC (modulo leap seconds, potentially).
Obviously it’s reliant on the local system clock, but it doesn’t depend on the local system time zone.
(It’s a shame that the Javadoc isn’t clearer on this, admittedly.)