Date time format for ReportLastChange and ReportLastChange is locale dependent
Original Reporter info from Mantis: jako
-
Reporter name: Simone Giacomelli
Original Reporter info from Mantis: jako
- Reporter name: Simone Giacomelli
Description:
When saving a report to .lrf file the date time is saved with current locale.
Then when loading the .lrf file the procedure fails because it uses a fixed locale.
I've fixed changing the following function in LR_Utils.pas
How it was:
function lrDateTimeToStr(ADate: TDateTime): string;
begin
Result:=FormatDateTime( 'YYYY-MM-DD HH:NN:SS', ADate);
end;
Fixed version:
function lrDateTimeToStr(ADate: TDateTime): string;
var
DF:TFormatSettings;
begin
DF.DateSeparator:='-';
DF.TimeSeparator:=':';
Result:=FormatDateTime( 'YYYY-MM-DD HH:NN:SS', ADate,DF);
end;
Steps to reproduce:
Use an italian date time format settings create a report and try to load it.
Mantis conversion info:
- Mantis ID: 27008
- OS: Windows
- OS Build: 2003 Srv Italian
- Build: 46529
- Platform: x64 (with x86 compiler)
- Version: 1.2.6
- Fixed in version: 1.7 (SVN)
- Fixed in revision: 52254 (#fbb22d7b)
- Monitored by: » jako (Simone Giacomelli)
- Target version: 1.8