Refactor crappy code for non-locale date breakage.