title: Converting datetimes to timestamps and back again
body: <p>I'm having some trouble with datetime in Python. I tried converting a datetime to a timestamp and then back again and no matter how I try the end result is not the same. I always end up with a datetime of datetime(2014, 1, 30, 23, 59, 40, 1998).</p>
  
  <pre><code>import datetime
  
  a = datetime.datetime.timestamp(datetime.datetime(2014, 1, 30, 23, 59, 40, 1999))
  b = datetime.datetime.fromtimestamp(a)
  
  print(b)
  </code></pre>