title: Javascript getDate() function returning one day ahead in Lambda function
body: <p>I am currently in Central time, and it is 7:19pm on 2/6/2018</p>
  
  <p>I have this line of Javascript in my code:</p>
  
  <pre><code>var d = new Date();
  var theMonth = d.getMonth() + 1;
  var theDay = d.getDate();
  var theYear = d.getFullYear();
  
  var formattedStartDate = theYear + "-" + theMonth + "-" + theDay;
  console.log(formattedStartDate);
  </code></pre>
  
  <p>The problem is, that this actually prints</p>
  
  <pre><code>2018-2-7
  </code></pre>
  
  <p>I am running hosting this code through AWS Lambda in the US East endpoint, so I cannot see why it would be using the wrong date completely. What could be the issue?</p>