As said above, it's wrong to do in the headerbag because getDate is also used for other headers.