diff --git a/Kernel/Arch/x86/common/RTC.cpp b/Kernel/Arch/x86/common/RTC.cpp index 7373c62f97..f9816f52e0 100644 --- a/Kernel/Arch/x86/common/RTC.cpp +++ b/Kernel/Arch/x86/common/RTC.cpp @@ -19,9 +19,9 @@ void initialize() s_boot_time = now(); } -time_t boot_time() +Time boot_time() { - return s_boot_time; + return Time::from_timespec({ s_boot_time, 0 }); } static bool update_in_progress() diff --git a/Kernel/Arch/x86/common/RTC.h b/Kernel/Arch/x86/common/RTC.h index c57ec79acb..80e49ff1e7 100644 --- a/Kernel/Arch/x86/common/RTC.h +++ b/Kernel/Arch/x86/common/RTC.h @@ -12,6 +12,6 @@ namespace Kernel::RTC { void initialize(); time_t now(); -time_t boot_time(); +Time boot_time(); } diff --git a/Kernel/FileSystem/DevPtsFS/Inode.cpp b/Kernel/FileSystem/DevPtsFS/Inode.cpp index 116a9f3db6..30f7afc038 100644 --- a/Kernel/FileSystem/DevPtsFS/Inode.cpp +++ b/Kernel/FileSystem/DevPtsFS/Inode.cpp @@ -38,7 +38,7 @@ InodeMetadata DevPtsFSInode::metadata() const { if (auto pty = m_pty.strong_ref()) { auto metadata = m_metadata; - metadata.mtime = pty->time_of_last_write(); + metadata.mtime = Time::from_timespec({ pty->time_of_last_write(), 0 }); return metadata; } return m_metadata; diff --git a/Kernel/FileSystem/Ext2FS/Inode.cpp b/Kernel/FileSystem/Ext2FS/Inode.cpp index ecf28273d1..a08a35d2d3 100644 --- a/Kernel/FileSystem/Ext2FS/Inode.cpp +++ b/Kernel/FileSystem/Ext2FS/Inode.cpp @@ -477,10 +477,10 @@ InodeMetadata Ext2FSInode::metadata() const metadata.uid = m_raw_inode.i_uid; metadata.gid = m_raw_inode.i_gid; metadata.link_count = m_raw_inode.i_links_count; - metadata.atime = m_raw_inode.i_atime; - metadata.ctime = m_raw_inode.i_ctime; - metadata.mtime = m_raw_inode.i_mtime; - metadata.dtime = m_raw_inode.i_dtime; + metadata.atime = Time::from_timespec({ m_raw_inode.i_atime, 0 }); + metadata.ctime = Time::from_timespec({ m_raw_inode.i_ctime, 0 }); + metadata.mtime = Time::from_timespec({ m_raw_inode.i_mtime, 0 }); + metadata.dtime = Time::from_timespec({ m_raw_inode.i_dtime, 0 }); metadata.block_size = fs().block_size(); metadata.block_count = m_raw_inode.i_blocks; @@ -930,23 +930,23 @@ ErrorOr> Ext2FSInode::lookup(StringView name) return fs().get_inode({ fsid(), inode_index }); } -ErrorOr Ext2FSInode::update_timestamps(Optional atime, Optional ctime, Optional mtime) +ErrorOr Ext2FSInode::update_timestamps(Optional