Fix date handling

It's not the optimal solution, but in the face of poorly-thought-out data from WP, it's probably the best we can do.