Fix wall clock with 12h format

Stock strftime doesn't use capitalized "P", so for example on Windows
the wall clock didn't appear for 12h format. PM and AM are converted
to lowercase.
This commit is contained in:
aurhat
2015-09-08 01:05:54 +02:00
parent b7643a5200
commit 2fb111adf4
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -503,7 +503,7 @@ menuitem [Reset to default scoreboard...] [ loop rsl (listlen $DEFAULT_SCOREBOAR
menuitem [Close] [ closecurmenu ]
alias wallclockformat "" // strftime formatting
alias wallclockformatlist ["" %H:%M %H:%M:%S %I:%M%P %I:%M:%S%P U%H:%M U%H:%M:%S] //"U" at beginning means UTC/GMT time
alias wallclockformatlist ["" %H:%M %H:%M:%S %I:%M%p %I:%M:%S%p U%H:%M U%H:%M:%S] //"U" at beginning means UTC/GMT time
newmenu HUD
+1 -1
View File
@@ -841,7 +841,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
const char *ltimeformat = getalias("wallclockformat");
bool wallclock = ltimeformat && *ltimeformat;
//wallclockformat beginning with "U" shows UTC/GMT time
if(wallclock) formatstring(ltime)("%s", timestring(*ltimeformat != 'U', ltimeformat + int(*ltimeformat == 'U')));
if(wallclock) filtertext(ltime, timestring(*ltimeformat != 'U', ltimeformat + int(*ltimeformat == 'U')), FTXT_TOLOWER);
if(showstats)
{