1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:57:34 +00:00

AK: Rename Time to Duration

That's what this class really is; in fact that's what the first line of
the comment says it is.

This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
This commit is contained in:
kleines Filmröllchen 2023-03-13 16:30:34 +01:00 committed by Jelle Raaijmakers
parent 82ddc813d5
commit 213025f210
140 changed files with 634 additions and 628 deletions

View file

@ -12,7 +12,7 @@
namespace Web::Cookie {
static DeprecatedString time_to_string(Time const& time)
static DeprecatedString time_to_string(Duration const& time)
{
auto local_time = Core::DateTime::from_timestamp(time.to_seconds());
return local_time.to_deprecated_string("%Y-%m-%d %H:%M:%S %Z"sv);
@ -87,11 +87,11 @@ ErrorOr<Web::Cookie::Cookie> IPC::decode(Decoder& decoder)
auto value = TRY(decoder.decode<DeprecatedString>());
auto domain = TRY(decoder.decode<DeprecatedString>());
auto path = TRY(decoder.decode<DeprecatedString>());
auto creation_time = TRY(decoder.decode<Time>());
auto expiry_time = TRY(decoder.decode<Time>());
auto creation_time = TRY(decoder.decode<Duration>());
auto expiry_time = TRY(decoder.decode<Duration>());
auto host_only = TRY(decoder.decode<bool>());
auto http_only = TRY(decoder.decode<bool>());
auto last_access_time = TRY(decoder.decode<Time>());
auto last_access_time = TRY(decoder.decode<Duration>());
auto persistent = TRY(decoder.decode<bool>());
auto secure = TRY(decoder.decode<bool>());
auto same_site = TRY(decoder.decode<Web::Cookie::SameSite>());