From 38debc2554c33cb5486bfa6eee0bfd2147e7f7b1 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Fri, 21 Jul 2023 10:01:13 +0200 Subject: [PATCH] add timezone to session expiration --- src/routes/auth.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/auth.rs b/src/routes/auth.rs index 8e2f096..75b2358 100644 --- a/src/routes/auth.rs +++ b/src/routes/auth.rs @@ -62,7 +62,8 @@ async fn login( let token = session.token(); let mut response: Response = - Json(json!({ "session_token": token, "expires_at": session.expires_at })).into_response(); + Json(json!({ "session_token": token, "expires_at": session.expires_at.and_utc() })) + .into_response(); response.headers_mut().insert( SET_COOKIE,