2
0

ex25.pp 630 B

123456789101112131415161718192021222324
  1. Program Example25;
  2. { Program to demonstrate the UTime function. }
  3. Uses linux;
  4. Var utim : utimbuf;
  5. year,month,day,hour,minute,second : Word;
  6. begin
  7. { Set access and modification time of executable source }
  8. GetTime (hour,minute,second);
  9. GetDate (year,month,day);
  10. utim.actime:=LocalToEpoch(year,month,day,hour,minute,second);
  11. utim.modtime:=utim.actime;
  12. if not Utime('ex25.pp',utim) then
  13. writeln ('Call to UTime failed !')
  14. else
  15. begin
  16. Write ('Set access and modification times to : ');
  17. Write (Hour:2,':',minute:2,':',second,', ');
  18. Writeln (Day:2,'/',month:2,'/',year:4);
  19. end;
  20. end.