title: Date time error in Python
body: <p>I'm trying to learn the functions of Python but there is one thing I came across which I cannot figure out.</p>
  
  <pre><code>calculated_time = '2014.03.08 11:43:12'
  &gt;&gt;&gt; calculated_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
  &gt;&gt;&gt; print calculated_time
      2017-09-22 15:59:34
  </code></pre>
  
  <p>Now when I run:</p>
  
  <pre><code>cmpDate = datetime.strptime(calculated_time, '%Y.%m.%d %H:%M:%S')
  Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/usr/lib/python2.7/_strptime.py", line 332, in _strptime
  (data_string, format))
  ValueError: time data '2017-09-22 16:35:12' does not match format'%Y.%m.%d %H:%M:%S'
  </code></pre>
  
  <p>I can't understand why, if I directly pass this date then it is running but when I pass it after storing in a variable then I've got an error.</p>