From 87400ed1de78a600a7be60cf02434e95536aa5d0 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 27 Feb 2014 17:46:45 +0100 Subject: [PATCH] Use local time when computing max-age expiration BDateTime.SetTime_t expects its parameter to be in local time. --- src/kits/network/libnetapi/NetworkCookie.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/kits/network/libnetapi/NetworkCookie.cpp b/src/kits/network/libnetapi/NetworkCookie.cpp index e7c16fff3c..5db1858a65 100644 --- a/src/kits/network/libnetapi/NetworkCookie.cpp +++ b/src/kits/network/libnetapi/NetworkCookie.cpp @@ -264,8 +264,9 @@ BNetworkCookie::SetDomain(const BString& domain) BNetworkCookie& BNetworkCookie::SetMaxAge(int32 maxAge) { - BDateTime expiration = BDateTime::CurrentDateTime(B_GMT_TIME); + BDateTime expiration = BDateTime::CurrentDateTime(B_LOCAL_TIME); expiration.SetTime_t(expiration.Time_t() + maxAge); + return SetExpirationDate(expiration); }