2
0
Эх сурвалжийг харах

* removed exporting a non standard strtotime, which was a workaround for missing
formatsettings/locale versions. Patch by Lacak2, Mantis #19870 (3rd)

git-svn-id: trunk@18110 -

marco 14 жил өмнө
parent
commit
b59c42f2c7

+ 2 - 7
rtl/objpas/sysutils/dati.inc

@@ -708,20 +708,15 @@ begin
     Raise EConvertError.Create(Msg);
 end;
 
-function StrToTime(const S: PChar; Len : integer; FormatSettings : TFormatSettings; separator : char = #0): TDateTime;
+function StrToTime(const S: string; FormatSettings : TFormatSettings): TDateTime;
 Var
   Msg : AnsiString;
 begin
-  Result:=IntStrToTime(Msg,S,Len,FormatSettings,#0);
+  Result:=IntStrToTime(Msg, @S[1], length(S), FormatSettings, #0);
   If (Msg<>'') then
     Raise EConvertError.Create(Msg);
 end;
 
-function StrToTime(const S: string; FormatSettings : TFormatSettings): TDateTime;
-begin
-  Result := StrToTime(@S[1], length(S), FormatSettings);
-end;
-
 function StrToTime(const s: ShortString; separator : char): TDateTime;
 begin
    result := StrToTime(@s[1], length(s), separator);

+ 2 - 3
rtl/objpas/sysutils/datih.inc

@@ -135,15 +135,14 @@ function StrToTime(const S: Shortstring): TDateTime;                  {$ifdef SY
 function StrToTime(const S: Ansistring): TDateTime;                   {$ifdef SYSUTILSINLINE}inline;{$endif}
 function StrToTime(const S: ShortString; separator : char): TDateTime;{$ifdef SYSUTILSINLINE}inline;{$endif}
 function StrToTime(const S: AnsiString; separator : char): TDateTime; {$ifdef SYSUTILSINLINE}inline;{$endif}
-function StrToTime(const S: PChar; Len : integer; FormatSettings : TFormatSettings; separator : char = #0): TDateTime;
 function StrToTime(const S: string; FormatSettings : TFormatSettings): TDateTime;
 function StrToDate(const S: ShortString; const useformat : string; separator : char): TDateTime;{$ifdef SYSUTILSINLINE}inline;{$endif}
 function StrToDate(const S: AnsiString; const useformat : string; separator : char): TDateTime;{$ifdef SYSUTILSINLINE}inline;{$endif}
 function StrToTime(const S: PChar; Len : integer; separator : char = #0): TDateTime;
 function StrToDate(const S: PChar; Len : integer; const useformat : string; separator : char = #0): TDateTime;
 function StrToDateTime(const S: string): TDateTime;
-function StrToDateTime(const s: ShortString; const Formatsettings : TFormatSettings): TDateTime;
-function StrToDateTime(const s: AnsiString; const Formatsettings : TFormatSettings): TDateTime;
+function StrToDateTime(const s: ShortString; const FormatSettings : TFormatSettings): TDateTime;
+function StrToDateTime(const s: AnsiString; const FormatSettings : TFormatSettings): TDateTime;
 function FormatDateTime(const FormatStr: string; DateTime: TDateTime):string;
 function FormatDateTime(const FormatStr: string; DateTime: TDateTime; const FormatSettings: TFormatSettings): string;
 procedure DateTimeToString(out Result: string; const FormatStr: string; const DateTime: TDateTime);