title: Is the value returned by System.currentTimeMillis() affected by Day Light Savings and Leap Second adjustments?
body: <p>I know that <code>System.currentTimeMillis()</code> gives the time in milliseconds since the epoch and it is sensitive to the wall clock time of the system. I also know that it is not advisable to use <code>System.currentTimeMillis()</code> to calculate elapsed time in a program that measures time. 
  Java library have provided <code>System.nanoTime()</code> for that purpose.</p>
  
  <p>I have two specific questions for <code>System.currentTimeMillis()</code>:</p>
  
  <ol>
  <li>Does it get affected by leap second adjustments? I think the answer is <em>yes</em> since the wall clock time of the system will be adjusted because of the leap second.</li>
  <li>Does it get affected when <em>DST</em> (DayLight Savings) is turned on/off ? What would happen when the time suddenly changes  from 23:59 to 2:00? Since the system clock actually changes I would think that the answer is again <em>yes</em> but I would like to check with the community.</li>
  </ol>