Use a date object for cookie expiration

Bug: T85478
Change-Id: Id74f8aed8166bea5b92b1d69ab90115c7fe8927f