def reverse_timestamp(dt):
 epoch = datetime.datetime(1970, 1, 1)
 td = (dt - epoch)
 ts = ((td.microseconds + ((td.seconds + ((td.days * 24) * 3600)) * 100000)) / 100000)
 return (9223372036854775807 - ts)

def reverse_timestamp ( dt ) : epoch = datetime . datetime ( 1970 , 1 , 1 ) td = ( dt - epoch ) ts = ( ( td . microseconds + ( ( td . seconds + ( ( td . days * 24 ) * 3600 ) ) * 100000 ) ) / 100000 ) return ( 9223372036854775807 - ts )
reverse timestamp so that newer timestamps are represented by smaller numbers than older ones .