Use a platform-independent (read: Windows-friendly) way to format dates with no leading zeros
Under Windows, skip setting locale at all

This should prevent nasty "UnicodeDecodeError: 'ascii' codec can't decode..." errors when formatting dates