Ich dachte StrToTime berücksichtigt das alles.
Mein Workaround sieht so aus
Delphi-Quellcode:
function CustomFormatSettings(TimeSeparator: Char = ':'; DateSeparator: Char = '/'): TFormatSettings;
begin
Result := TFormatSettings.Create(GetUserDefaultLCID);
Result.TimeSeparator := TimeSeparator;
Result.DateSeparator := DateSeparator;
Result.ShortDateFormat := 'dd' + DateSeparator + 'mm' + DateSeparator + 'yyyy';
Result.LongDateFormat := 'dddd, dd. mm yyyy';
end;
DateTimePicker1.Time := StrToTime('12:00:00', CustomFormatSettings);