В приложении есть такие функции:
const
SecPerDay = 86400;
SecPerHour = 3600;
SecPerMinute = 60;
HoursPerDay = 24;
MinsPerHour = 60;
SecsPerMin = 60;
MSecsPerSec = 1000;
MinsPerDay = HoursPerDay * MinsPerHour;
SecsPerDay = MinsPerDay * SecsPerMin;
MSecsPerDay = SecsPerDay * MSecsPerSec;
function EncTime(Hour, Min, Sec, MSec: Word): TDateTime;
Var
Time: TDateTime;
begin
if (Hour < HoursPerDay) and (Min < MinsPerHour) and (Sec < SecsPerMin)
and (MSec < MSecsPerSec) then
begin
Time := (Hour * (MinsPerHour * SecsPerMin * MSecsPerSec) +
Min * (SecsPerMin * MSecsPerSec) +
Sec * MSecsPerSec +
MSec) / MSecsPerDay;
Result := Time;
end;
end;
function SecondToTime(const Seconds: Cardinal): Double;
var
ms, ss, mm, hh: Cardinal;
begin
hh := (Seconds mod SecPerDay) div SecPerHour;
mm := ((Seconds mod SecPerDay) mod SecPerHour) div SecPerMinute;
ss := ((Seconds mod SecPerDay) mod SecPerHour) mod SecPerMinute;
ms := 0;
Result := EncTime(hh, mm, ss, ms);
end;
Надо было результат SecondToTime(sC) получить в текстовом виде.
Выражение типа:
Time2StrFmt('HH:mm:ss', SecondToTime(sC))
и выдавало такой результат...