title: Java timer task: Adjusting daylight saving time
body: <p>I have a piece of code that has to be executed at a particular time <strong>every day</strong>. If I schedule it to be executed at 9PM everyday, then it has to work even during the switching of Day light saving. </p>
  
  <p>Which Java API can be used to achieve this?</p>
  
  <pre><code>int ONE_DAY = 1000 * 60 * 60 * 24;
  Timer timer = new Timer();
  timer.schedule(myTimerTask, startTime, ONE_DAY); // startTime is 9PM of current day
  </code></pre>
  
  <p>I've used the above approach which will not take care of DST.</p>