Zitat von Carsten Bager <carsten@beas.dk>:

> When I do this
>
> Free Pascal Compiler version 2.2.2 [2008/07/29] for i386

Which OS?

> ---------------------
> Program tt;
> uses dos,
>      sysutils;
>
> function strPackTime(t:longWord):shortstring;
> var
>   dt:Datetime;
> begin
>   UnpackTime(t,dt);
>   strPackTime:=intToStr(dt.day)+'/'+
>          intToStr(dt.month)+'-'+
>          intToStr(dt.year)+
>          intToStr(dt.hour)+':'+
>          intToStr(dt.min)+':'+
>          intToStr(dt.sec)+' ';
> end;
>
> Begin
>   WriteLn(strPackTime(DateTimeToFileDate(now)));
>
> WriteLn(DateTimeToStr(FileDateToDateTime(DateTimeToFileDate(now))))
> ;
> End.
> ---------------------------------
>
> I get this result
>
> 9/6-20160:28:22
> 11-9-08 13:39:55
>
> What am I doing wrong.


Mattias


