Milliseconds for Timestamps in UDSEntry

KIO should expose file timestamps with millisecond precision, consistent with what is available through other APIs like Qt’s QFileInfo.

At the moment, KIO::UDSEntry only provides timestamps (creation time, modification time, and access time) with second-level precision. This is a limitation when compared to QFileInfo, which exposes these timestamps with millisecond resolution on platforms and filesystems that support it.

I maintain software that uses both QFileInfo and KIO stat information for the same files. When comparing metadata obtained via these two paths, timestamp comparisons frequently fail because KIO truncates timestamps to seconds, while QFileInfo retains milliseconds. This makes it impossible to reliably detect equality or changes based on timestamps alone.

Modern filesystems and operating systems commonly support sub-second timestamp resolution, and Qt already exposes this information. KIO losing this precision forces downstream applications either to introduce ad-hoc tolerances or to avoid KIO metadata altogether for timestamp-sensitive logic. Providing millisecond-accurate timestamps in UDSEntry (for creation, modification, and access times) would improve consistency with Qt, reduce subtle bugs in applications that combine APIs.

1 Like