headers: fixed Date header bug

I was calculating the seconds myself, and didn't notice that JS returns milliseconds by default
this caused the "Too old" and "Too future" date validation to be much too strict.