def mysql_timestamp_converter(s):
 if (s[4] == '-'):
  return DateTime_or_None(s)
 s = (s + ('0' * (14 - len(s))))
 parts = map(int, filter(None, (s[:4], s[4:6], s[6:8], s[8:10], s[10:12], s[12:14])))
 try:
  return Timestamp(*parts)
 except (SystemExit, KeyboardInterrupt):
  raise
 except:
  return None

def mysql_timestamp_converter ( s ) : if ( s [ 4 ] == '-' ) : return DateTime_or_None ( s ) s = ( s + ( '0' * ( 14 - len ( s ) ) ) ) parts = map ( int , filter ( None , ( s [ : 4 ] , s [ 4 : 6 ] , s [ 6 : 8 ] , s [ 8 : 10 ] , s [ 10 : 12 ] , s [ 12 : 14 ] ) ) ) try : return Timestamp ( * parts ) except ( SystemExit , KeyboardInterrupt ) : raise except : return None
convert a mysql timestamp to a timestamp object .