Skip to content

Errors in Time.pass #8

@natugle

Description

@natugle

When compiling with Lazarus 1.6.4 and Fpc 3.0.2 the program reports wrong time settings.
The fix is to change the calls it two functions. The correct code shuld look like this:

Function DateTime2UnivDateTime(d:TDateTime):TDateTime;
{$IFDEF FPC}
begin
//  Result := UniversalTimeToLocal(d);
  Result := LocalTimeToUniversal(d);
end;
{$ELSE}

-----------
Function UnivDateTime2LocalDateTime(d:TDateTime):TDateTime;
{$IFDEF FPC}
begin
  Result := UniversalTimeToLocal(d);
//  Result := LocalTimeToUniversal(d);
end;
{$ELSE}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions