Use local time when computing max-age expiration
BDateTime.SetTime_t expects its parameter to be in local time.
This commit is contained in:
parent
3d50acca57
commit
87400ed1de
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user