title: How to properly parse AM/PM in timestamp's period in Python?
body: <p>I'm having trouble parsing a specific string for a timestamp.  The am/pm period doesn't seem to be processed properly:</p>
  
  <pre><code>$ python --version
  Python 2.7.17
  $ cat tmp/time_problem
  #! /usr/bin/env python
  
  import datetime
  
  timestamp_string = '2019-10-22, 3:48:35 PM'
  timestamp = datetime.datetime.strptime(timestamp_string, '%Y-%m-%d, %H:%M:%S %p')
  print repr(timestamp)
  $ tmp/time_problem
  datetime.datetime(2019, 10, 22, 3, 48, 35)
  $
  </code></pre>
  
  <p>Why isn't the hour 15 rather than 3?  What am I doing wrong?</p>