Improve POSIX date handling