title: timestamp of 31/12/9999 23:59:29
body: <p>Please have a look at the description below and let me know why the timestamp for 
  31/12/9999 23:59:29 is not 253402264799, but 253402261199.</p>
  
  <p>Many thanks,</p>
  
  <p>Huy</p>
  
  <pre><code>import datetime
  d1 = datetime.datetime(1970, 1,1,10,0,0)  ; I am in zone time 10
  d2 = datetime.datetime(1970, 1,2,23,59, 59)
  print d2 - d1 --&gt; 1 day, 13:59:59  
  convert 1 day, 13:59:59 to sec
  = 136799s  &lt;-- (48 + 14) * 3600 - 1
  
  d1 = datetime.datetime(1970, 1,1,10,0,0)
  d2 = datetime.datetime(9999, 12, 31, 23, 59, 59)  
  print d2 - d1 --&gt; 2932896 days, 13:59:59 
  convert 2932896 days, 13:59:59 to sec
  253402264799sec &lt;-- (2932896 * 24 + 14) * 3600 - 1
  
  print datetime.datetime.fromtimestamp(253402264799) --&gt; exception throw
  
  print datetime.datetime.fromtimestamp(253402261199) --&gt; 31/12/9999 23:59:59
  </code></pre>