From f9a76aaa569c4c17c0e79e1100a2ec522903286a Mon Sep 17 00:00:00 2001 From: marcoonthegit Date: Sat, 29 Oct 2022 16:12:40 +0200 Subject: [PATCH] * Add AMPM to string, patch from closes #39973 --- rtl/win/sysutils.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp index ac522de4db..4f2772471c 100644 --- a/rtl/win/sysutils.pp +++ b/rtl/win/sysutils.pp @@ -1243,9 +1243,15 @@ begin HF:='h' else HF:='hh'; - // No support for 12 hour stuff at the moment... ShortTimeFormat := HF+':nn'; LongTimeFormat := HF + ':nn:ss'; + { 12-hour system support } + if GetLocaleInt(LID, LOCALE_ITIME, 1) = 0 then + begin + LongTimeFormat := LongTimeFormat + ' AMPM'; + ShortTimeFormat := ShortTimeFormat + ' AMPM'; + end; + { Currency stuff } CurrencyString:=GetLocaleStr(LID, LOCALE_SCURRENCY, ''); CurrencyFormat:=StrToIntDef(GetLocaleStr(LID, LOCALE_ICURRENCY, '0'), 0);