title: Find time difference between 2 time stamp values in python
body: <pre><code>import datetime
  
  def get_time_value(timestamp):
       time = datetime.datetime.fromtimestamp(timestamp)
       return time.strftime("%Y-%m-%d %H:%M:%S")
  </code></pre>
  
  <p>I have </p>
  
  <pre><code>start_time = 1518842893.04001
  end_time = 1518842898.21265
  
  get_time_value(end_time-start_time)
  </code></pre>
  
  <p>It gives</p>
  
  <pre><code>1969-12-31 16:00:05
  </code></pre>
  
  <p>and not the correct value</p>
  
  <pre><code>'startTime': '2018-02-16 20:48:13', 'endTime': '2018-02-16 20:48:18'
  </code></pre>