Sfoglia il codice sorgente

* Add AMPM to string, patch from closes #39973

(cherry picked from commit f9a76aaa569c4c17c0e79e1100a2ec522903286a)
marcoonthegit 2 anni fa
parent
commit
705e7429d3
1 ha cambiato i file con 7 aggiunte e 1 eliminazioni
  1. 7 1
      rtl/win/sysutils.pp

+ 7 - 1
rtl/win/sysutils.pp

@@ -1056,9 +1056,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);