Bug 468881

Summary: Timestamps in directorysizes file for Trash shown in milliseconds instead of seconds since epoch
Product: [Frameworks and Libraries] frameworks-kio Reporter: Lukas Spies <Lukas>
Component: TrashAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.105.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Lukas Spies 2023-04-23 21:43:12 UTC
SUMMARY

When deleting a folder (moving it to trash) in Dolphin or with an icon on the desktop, then the directorysizes file stores a timestamp for that folder's trashinfo file in milliseconds since Epoch. However, according to the freedesktop.org specification, this should be seconds since Epoch:

"Directory size cache
(...)
The modification time is stored as an integer, the number of seconds since Epoch."

- https://specifications.freedesktop.org/trash-spec/trashspec-latest.html


STEPS TO REPRODUCE
1. Delete a folder in Dolphin or from the desktop.
2. Check the content of the diretorysizes file (~/.local/share/Trash/directorysizes).

OBSERVED RESULT
The timestamp (second column) is shown in milliseconds since epoch

EXPECTED RESULT
The timestamp (second column) should be shown in seconds since epoch

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9