fix encoding of date below 1970