title: Wrong message time difference
body: <p>I have a question regarding a code. I just started a programming course and this is obviously not a very efficient code. It is part of a bigger code but this is where I get a wrong output.</p>
  <p>I have a distance in Km, speed in km/h and arrival time (arr) as a list [month, day, hour, min]
  I used y = time.time()-1577793600 to get the current time in seconds this year. (the number I'm subtracting is the amount of seconds since Unix epoch time. (I know this is a terrble way of doing it but I thought it somewhat made sense). Also, time_to_destination is the time required to get to the destination in seconds.</p>
  <pre class="lang-py prettyprint-override"><code>import time
  
  distance = 1000
  
  speed = 3
  
  arrival = [10, 13, 11, 30]
  
  y = time.time()-1577793600
  time_to_destination = (distance*1000) / (speed / 3.6)
  
  arr = ((arrival[0]-1)*(30*24*3600)+ (arrival[1]-1)*(24*3600) + (arrival[2])*(3600)+(arrival[3]))
  
  ti = arr - time_to_destination
              
  if arr &lt; y:
      return 'Date is in the past'
              
  elif y &gt; ti:
       return 'You are too late'
  </code></pre>
  <p>However, this should return &quot;Your are too late&quot;, since the time arrival time isn't in the past but I can't make it with the speed I've given. However, The output is &quot;Date is in the past&quot;. Why is this the case?</p>