mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +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 <AK/Debug.h>
|
||||
#include <LibCore/DateTime.h>
|
||||
#include <LibCore/Directory.h>
|
||||
#include <LibCore/MimeData.h>
|
||||
#include <LibCore/Resource.h>
|
||||
|
@ -146,8 +145,8 @@ static HTTP::HeaderMap response_headers_for_file(StringView path, Optional<time_
|
|||
response_headers.set("Content-Type"sv, mime_type);
|
||||
|
||||
if (modified_time.has_value()) {
|
||||
auto const datetime = Core::DateTime::from_timestamp(modified_time.value());
|
||||
response_headers.set("Last-Modified"sv, datetime.to_byte_string("%a, %d %b %Y %H:%M:%S GMT"sv, Core::DateTime::LocalTime::No));
|
||||
auto const datetime = AK::UnixDateTime::from_seconds_since_epoch(modified_time.value());
|
||||
response_headers.set("Last-Modified"sv, datetime.to_byte_string("%a, %d %b %Y %H:%M:%S GMT"sv));
|
||||
}
|
||||
|
||||
return response_headers;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue