[fpc-devel] File Dates

Michael Van Canneyt michael.vancanneyt at wisa.be
Mon Jan 24 09:15:20 CET 2005



On Mon, 24 Jan 2005, DrDiettrich wrote:

> Currently I'm trying to define an object for file dates. This object
> shall allow to compare time stamps for files on disk and in archives,
> and it also shall be usable to set time stamps for such files. Now I'm
> undecided what unique internal date/time representation to use in such
> an object.
>
> For comparison the minimum resolution of the given time stamps should be
> taken into account, so that computations don't result in different time
> stamps for the same time. This restriction prohibits the use of
> TDateTime, where floating point calculations can result in such
> differences.
>
> Do there exist usable data formats for such time stamps?
>
> What time stamps are in use on the various platforms?

Too various. I suggest using simply TDateTime. It has microsecond
resolution, which should be more than enough. It offers the additional
advantage that no transformations are necessary for display & compare
routines. There are a lot of TDateTime routines in the RTL, they would
all be at your disposal.


Michael.




More information about the fpc-devel mailing list