Error analysis of weak Galerkin finite element methods for time-dependent convection–diffusion equations