Join GitHub today
app: change date/time format in log widget #800
I dunno, this changes the format string for folks that do have AM/PM, so I can't merge this as-is.
Maybe we can use a strategy similar to what they do here in the last answer:
strftime('%p') before using the alternate format string.
That said, I don't really see what's so weird about the format string you pasted. The logic behind it is that we want to show the most volatile parts first -- the time and seconds. The date is less volatile, so there's no sense in showing it first.
This new format string loses that property. Maybe a simple compromise would be to reverse it to
'%X %x: ' instead?
This is not correct, if your locale uses AM/PM then so will this format:
By weird I actually meant this (I should've explained it more in the PR, sorry):
Actually I didn't mean to swap the order, I did it instinctively. I can live with the reverse order, but I have to say, I cannot remember ever seeing the time before the date in any kind of log messages.
added a commit
this pull request
Apr 14, 2018
I don't think passing the time format through gettext is the correct thing to do, because then the time format will depend on the current language, and not the current locale. Locale and language settings are not the same.