tunitdt1.pp 510 B

123456789101112131415
  1. { %target=linux,freebsd,openbsd,aix,darwin,netbsd }
  2. uses
  3. dateutils;
  4. var
  5. y,m,d,h,mn,s,s1000 : word;
  6. begin
  7. DecodeDateTime(UnixToDateTime(15796372693),y,m,d,h,mn,s,s1000);
  8. if (y<>2470) or (m<>7) or (d<>26) or (h<>9) or (mn<>18) or (s<>13) or (s1000<>0) then
  9. halt(1);
  10. DecodeDateTime(UnixToDateTime(DateTimeToUnix(EncodeDateTime(2345,12,12,4,45,49,0))),y,m,d,h,mn,s,s1000);
  11. if (y<>2345) or (m<>12) or (d<>12) or (h<>4) or (mn<>45) or (s<>49) or (s1000<>0) then
  12. halt(1);
  13. writeln('ok');
  14. end.