dates are outputted wrong