Spatial panel data models with temporal heterogeneity