Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • Lazarus Lazarus
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 2,080
    • Issues 2,080
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • Lazarus
  • LazarusLazarus
  • Issues
  • #27008
Closed
Open
Created Nov 06, 2014 by FPC Admin account@fpc_adminOwner

Date time format for ReportLastChange and ReportLastChange is locale dependent

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
Assignee
Assign to
Time tracking