tvplanit: Fix export of advance alarm time to ical event.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8408 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-08-21 15:29:39 +00:00
parent de666e671c
commit 40a1394e3c
2 changed files with 6 additions and 6 deletions

View File

@ -1434,9 +1434,9 @@ begin
Result.Alarm.Audio := (FDingPath <> '') and FileExists(FDingPath); Result.Alarm.Audio := (FDingPath <> '') and FileExists(FDingPath);
Result.Alarm.AudioSrc := FDingPath; Result.Alarm.AudioSrc := FDingPath;
case FAlarmAdvType of case FAlarmAdvType of
atMinutes: Result.Alarm.Trigger := -FAlarmAdv * OneMinute; atMinutes: Result.Alarm.Trigger := -abs(FAlarmAdv) * OneMinute;
atHours: Result.Alarm.Trigger := -FAlarmAdv * OneHour; atHours: Result.Alarm.Trigger := -abs(FAlarmAdv) * OneHour;
atDays: Result.Alarm.Trigger := -FAlarmAdv; atDays: Result.Alarm.Trigger := -abs(FAlarmAdv);
end; end;
Result.Alarm.RepeatCount := 1; Result.Alarm.RepeatCount := 1;
end; end;

View File

@ -252,11 +252,11 @@ begin
isNeg := true; isNeg := true;
AValue := -AValue; AValue := -AValue;
end; end;
if IsInteger(AValue, 1.0 / SecondsInDay) then if IsInteger(AValue*SecondsInDay, 1.0 / SecondsInDay) then
Result :=Format('P%dS', [round(AValue * SecondsInDay)]) Result :=Format('P%dS', [round(AValue * SecondsInDay)])
else if IsInteger(AValue, 1.0/MinutesInDay) then else if IsInteger(AValue*MinutesInDay, 1.0/MinutesInDay) then
Result := Format('P%dM', [round(AValue * MinutesInDay)]) Result := Format('P%dM', [round(AValue * MinutesInDay)])
else if IsInteger(AValue, 1.0/HoursInday) then else if IsInteger(AValue*HoursInDay, 1.0/HoursInDay) then
Result := Format('P%dH', [round(AValue * HoursInDay)]) Result := Format('P%dH', [round(AValue * HoursInDay)])
else if IsInteger(AValue, 1.0) then else if IsInteger(AValue, 1.0) then
Result := Format('P%dD', [round(AValue)]) Result := Format('P%dD', [round(AValue)])