appmon icon indicating copy to clipboard operation
appmon copied to clipboard

Fix "Invalid format string" in Windows

Open raulsiles opened this issue 8 years ago • 1 comments

ValueError: Invalid format string

%l is not standard: %l - Hour of the day, 12-hour clock, blank-padded ( 1..12)

The Windows implementations doesn't support it: https://msdn.microsoft.com/en-us/library/fe06s4ak.aspx https://docs.python.org/3/library/time.html

Use %I instead: %I - Hour of the day, 12-hour clock, zero-padded (01..12)

raulsiles avatar Sep 30 '17 11:09 raulsiles

I assume this is a Windows only issue, as well as the other Windows-related pull requests I submitted last week. However, I have not tested them specifically in all supported OSes.

For this one, I suggest to use the same code for all OSes (Windows, Linux, macOS...), that is, a date representation that is standard for all them: uppercase i vs. lowercase l.

For the others, if the additional color library and reference does not break the behavior of Linux and macOS, I also suggest to use the same code for them all.

raulsiles avatar Oct 04 '17 14:10 raulsiles