diff --git a/Userland/Libraries/LibSQL/Heap.h b/Userland/Libraries/LibSQL/Heap.h index b3fe5f3018..3c216eb37f 100644 --- a/Userland/Libraries/LibSQL/Heap.h +++ b/Userland/Libraries/LibSQL/Heap.h @@ -66,7 +66,7 @@ private: */ class Heap : public RefCounted { public: - static constexpr u32 VERSION = 4; + static constexpr u32 VERSION = 5; static ErrorOr> create(ByteString); virtual ~Heap(); diff --git a/Userland/Libraries/LibWebView/CookieJar.cpp b/Userland/Libraries/LibWebView/CookieJar.cpp index 1688d1693e..f9731979a1 100644 --- a/Userland/Libraries/LibWebView/CookieJar.cpp +++ b/Userland/Libraries/LibWebView/CookieJar.cpp @@ -484,8 +484,7 @@ static ErrorOr parse_cookie(ReadonlySpan row) if (value.type() != SQL::SQLType::Integer) return Error::from_string_view(name); - auto time = value.to_int().value(); - field = UnixDateTime::from_seconds_since_epoch(time); + field = value.to_unix_date_time().value(); return {}; }; @@ -528,9 +527,9 @@ void CookieJar::insert_cookie_into_database(Web::Cookie::Cookie const& cookie) cookie.name.to_byte_string(), cookie.value.to_byte_string(), to_underlying(cookie.same_site), - cookie.creation_time.seconds_since_epoch(), - cookie.last_access_time.seconds_since_epoch(), - cookie.expiry_time.seconds_since_epoch(), + cookie.creation_time, + cookie.last_access_time, + cookie.expiry_time, cookie.domain.to_byte_string(), cookie.path.to_byte_string(), cookie.secure, @@ -552,9 +551,9 @@ void CookieJar::update_cookie_in_database(Web::Cookie::Cookie const& cookie) storage.statements.update_cookie, {}, [this]() { purge_expired_cookies(); }, {}, cookie.value.to_byte_string(), to_underlying(cookie.same_site), - cookie.creation_time.seconds_since_epoch(), - cookie.last_access_time.seconds_since_epoch(), - cookie.expiry_time.seconds_since_epoch(), + cookie.creation_time, + cookie.last_access_time, + cookie.expiry_time, cookie.secure, cookie.http_only, cookie.host_only,