Fix #1898 by doing an initial call to `datetime.strptime`

Fix #1898 by doing an initial call to `datetime.strptime`.

This commit works around an upstream threading bug
http://bugs.python.org/issue7980 which affects Mac OS X. It includes a
test which is skipped by default because it will not always fail.

@toastdriven please review.