fix cookie expiry date

This commit is contained in:
Daniella 2022-07-03 23:42:39 +02:00
parent ea50fd13ac
commit c183565d4b

View file

@ -40,7 +40,7 @@ public class HTTPResponseWriter {
write(HTTPUtils.encodeUTF8(resp.cookiesToSet.get(cookies[i])));
write("; ");
write("Expires=\"");
write(new SimpleDateFormat("HH:MM:SS dd MMM yyyy").format(new Date(System.currentTimeMillis() + 1 * 365 * 24 * 60 * 60 * 1000)));
write(new SimpleDateFormat("HH:mm:ss dd MMM yyyy").format(new Date(System.currentTimeMillis() + 365l * 24 * 60 * 60 * 1000)));
write("\"; Path=/");
writeCRLF();
}