mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +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:
parent
c1323febc2
commit
939600d2d4
41 changed files with 115 additions and 125 deletions
|
@ -8,12 +8,12 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
Duration time_from_packed_dos(DOSPackedDate date, DOSPackedTime time)
|
||||
UnixDateTime time_from_packed_dos(DOSPackedDate date, DOSPackedTime time)
|
||||
{
|
||||
if (date.value == 0)
|
||||
return Duration();
|
||||
return UnixDateTime::from_unix_time_parts(first_dos_year, 1, 1, 0, 0, 0, 0);
|
||||
|
||||
return Duration::from_timestamp(first_dos_year + date.year, date.month, date.day, time.hour, time.minute, time.second * 2, 0);
|
||||
return UnixDateTime::from_unix_time_parts(first_dos_year + date.year, date.month, date.day, time.hour, time.minute, time.second * 2, 0);
|
||||
}
|
||||
|
||||
DOSPackedDate to_packed_dos_date(unsigned year, unsigned month, unsigned day)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue