Everywhere: Replace DateTime::to_string() with UnixDateTime::to_string()

Replace LibCore::DateTime::to_string() with
AK::UnixDateTime::to_string().
Remove unncessary #include <LibCore/DateTime.h>.
This commit is contained in:
Tomasz Strejczek 2025-06-19 21:05:42 +02:00 committed by Andrew Kaster
parent 8f8e51b1fc
commit 6fb2be96bf
Notes: github-actions[bot] 2025-06-20 00:44:11 +00:00
13 changed files with 25 additions and 30 deletions

View file

@ -6,7 +6,6 @@
*/
#include "Cookie.h"
#include <LibCore/DateTime.h>
#include <LibIPC/Decoder.h>
#include <LibIPC/Encoder.h>
@ -14,9 +13,7 @@ namespace Web::Cookie {
static String time_to_string(UnixDateTime const& time)
{
// FIXME: This roundabout formatting should not be necessary; it also loses precision.
auto local_time = Core::DateTime::from_timestamp(time.seconds_since_epoch());
return MUST(local_time.to_string("%Y-%m-%d %H:%M:%S %Z"sv));
return MUST(time.to_string("%Y-%m-%d %H:%M:%S %Z"sv));
}
String Cookie::creation_time_to_string() const