title: Swift NSCalendar.currentCalendar().isDateInToday.() not working properly
body: <p>Because this post is related to comparing a given date to "today's date" keep in mind that I am posting this on a 2017-01-26</p>
  
  <p>Basically, I am doing the following:</p>
  
  <ol>
  <li>Getting an ISO DATE from the server</li>
  <li>Transforming said date to an NSDate</li>
  <li>using NSCalendar.currentCalendar().isDateInToday(myDate!) to actually check if that date is today.</li>
  </ol>
  
  <p>However, it seems like I am doing something wrong, or missing something since the output seems abnormal. </p>
  
  <p>I copied this output from my console:</p>
  
  <pre><code>String sent by the server --&gt; 2017-1-27T0:00:00.000Z
  Conversion I make with a dateFormatter --&gt; (2017-01-27 00:00:00 +0000)
  2017-01-27 00:00:00 +0000  is TODAY 
  </code></pre>
  
  <p>The output above is obviously wrong. Because that is tomorrow, not today.</p>
  
  <p>Now, in the following output, the date sent by the server is actually today but NSCalendar.currentCalendar().isDateInToday(myDate!) says otherwise</p>
  
  <pre><code>String sent by the server --&gt; 2017-1-26T0:00:00.000Z
  Conversion I make with a dateFormatter Optional(2017-01-26 00:00:00 +0000)
  2017-01-26 00:00:00 +0000 is NOT TODAY
  </code></pre>
  
  <p>My question is, what could I be doing wrong? 
  I've double checked that my computer, the simulator and the dateFormatter.locale are properly set.</p>
  
  <p>I've tried locales in string like "es_CL"
  and also   </p>
  
  <pre><code>  dateFormatter.locale = NSLocale.currentLocale()
  </code></pre>