mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
LibGUI: Use Core::DateTime in FileSystemModel
This commit is contained in:
parent
e22283e5e6
commit
5e42fe76d6
1 changed files with 2 additions and 8 deletions
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/NonnullOwnPtrVector.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/Notifier.h>
|
||||
#include <LibGUI/Model.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -126,14 +127,7 @@ public:
|
|||
|
||||
static String timestamp_string(time_t timestamp)
|
||||
{
|
||||
auto* tm = localtime(×tamp);
|
||||
return String::format("%4u-%02u-%02u %02u:%02u:%02u",
|
||||
tm->tm_year + 1900,
|
||||
tm->tm_mon + 1,
|
||||
tm->tm_mday,
|
||||
tm->tm_hour,
|
||||
tm->tm_min,
|
||||
tm->tm_sec);
|
||||
return Core::DateTime::from_timestamp(timestamp).to_string();
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue