Improved timed rotator script with better date string parsing.