1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-13 19:37:34 +00:00

Kernel: Use UnixDateTime wherever applicable

"Wherever applicable" = most places, actually :^), especially for
networking and filesystem timestamps.

This includes changes to unzip, which uses DOSPackedTime, since that is
changed for the FAT file systems.
This commit is contained in:
kleines Filmröllchen 2023-03-13 22:11:13 +01:00 committed by Jelle Raaijmakers
parent c1323febc2
commit 939600d2d4
41 changed files with 115 additions and 125 deletions

View file

@ -635,7 +635,7 @@ ErrorOr<Process::ScopedDescriptionAllocation> Process::OpenFileDescriptions::all
return EMFILE;
}
Duration kgettimeofday()
UnixDateTime kgettimeofday()
{
return TimeManagement::now();
}
@ -699,7 +699,7 @@ ErrorOr<void> Process::dump_core()
return {};
}
auto coredump_path = TRY(name().with([&](auto& process_name) {
return KString::formatted("{}/{}_{}_{}", coredump_directory_path->view(), process_name->view(), pid().value(), kgettimeofday().to_truncated_seconds());
return KString::formatted("{}/{}_{}_{}", coredump_directory_path->view(), process_name->view(), pid().value(), kgettimeofday().seconds_since_epoch());
}));
auto coredump = TRY(Coredump::try_create(*this, coredump_path->view()));
return coredump->write();