From 5e42fe76d6e0f51145f9c4056fe51ea4501321da Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 11 Feb 2020 20:05:44 +0100 Subject: LibGUI: Use Core::DateTime in FileSystemModel --- Libraries/LibGUI/FileSystemModel.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'Libraries') diff --git a/Libraries/LibGUI/FileSystemModel.h b/Libraries/LibGUI/FileSystemModel.h index 9b54c4b0a3..02bc652075 100644 --- a/Libraries/LibGUI/FileSystemModel.h +++ b/Libraries/LibGUI/FileSystemModel.h @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -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: -- cgit v1.2.3