Use local time when computing max-age expiration

BDateTime.SetTime_t expects its parameter to be in local time.
This commit is contained in:
Adrien Destugues 2014-02-27 17:46:45 +01:00
parent 3d50acca57
commit 87400ed1de

View File

@ -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);
}