mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
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:
parent
8f8e51b1fc
commit
6fb2be96bf
Notes:
github-actions[bot]
2025-06-20 00:44:11 +00:00
Author: https://github.com/tomaszstrejczek
Commit: 6fb2be96bf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5096
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/R-Goc
Reviewed-by: https://github.com/gmta
13 changed files with 25 additions and 30 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue