We study the finite-temperature free energy and fermion number for Dirac fields in a one-dimensional spatial segment, under two different members of the family of local boundary conditions defining a self-adjoint Euclidean Dirac operator in two dimensions. For one of such boundary conditions, compatible with the presence of a spectral asymmetry, we discuss in detail the contribution of this part of the spectrum to the zeta-regularized determinant of the Dirac operator and, thus, to the finite-temperature properties of the theory.