def _When(val):
 try:
  return (_EPOCH + datetime.timedelta(microseconds=val))
 except OverflowError:
  return _OverflowDateTime(val)

def _When ( val ) : try : return ( _EPOCH + datetime . timedelta ( microseconds = val ) ) except OverflowError : return _OverflowDateTime ( val )
coverts a gd_when value to the appropriate type .