def timestampUNIX(value):
 if (not isinstance(value, (float, int, long))):
  raise TypeError('timestampUNIX(): an integer or float is required')
 if (not (0 <= value <= 2147483647)):
  raise ValueError('timestampUNIX(): value have to be in 0..2147483647')
 return (UNIX_TIMESTAMP_T0 + timedelta(seconds=value))

def timestampUNIX ( value ) : if ( not isinstance ( value , ( float , int , long ) ) ) : raise TypeError ( 'timestampUNIX(): an integer or float is required' ) if ( not ( 0 <= value <= 2147483647 ) ) : raise ValueError ( 'timestampUNIX(): value have to be in 0..2147483647' ) return ( UNIX_TIMESTAMP_T0 + timedelta ( seconds = value ) )
convert an unix timestamp to datetime object .