title: Adding days to Epoch time [Java]
body: <p>Epoch time is the number of milliseconds that have passed since 1st January 1970, so if i want to add <code>x</code> days to that time, it seems natural to add milliseconds equivalent to <code>x</code> days to get the result </p>
  
  <pre><code>Date date = new Date();
  System.out.println(date);
  // Adding 30 days to current time
  long longDate = date.getTime() + 30*24*60*60*1000;
  System.out.println(new Date(longDate));
  </code></pre>
  
  <p>it gives the following output</p>
  
  <pre><code>Mon Dec 26 06:07:19 GMT 2016
  Tue Dec 06 13:04:32 GMT 2016
  </code></pre>
  
  <p>I know i can use <code>Calendar</code> class to solve this issue, but just wanted to understand about this behaviour</p>