From 22cf408d6c1ca26566aefaa335a34182e417c9ed Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Wed, 3 Apr 2024 21:48:35 +0200 Subject: [PATCH] [backend/api] Fix session createdAt being populated as -infinity --- Iceshrimp.Backend/Controllers/AuthController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Controllers/AuthController.cs b/Iceshrimp.Backend/Controllers/AuthController.cs index 11edec7e..50ceead9 100644 --- a/Iceshrimp.Backend/Controllers/AuthController.cs +++ b/Iceshrimp.Backend/Controllers/AuthController.cs @@ -67,7 +67,7 @@ public class AuthController(DatabaseContext db, UserService userSvc, UserRendere Id = IdHelpers.GenerateSlowflakeId(), UserId = user.Id, Active = !profile.TwoFactorEnabled, - CreatedAt = new DateTime(), + CreatedAt = DateTime.UtcNow, Token = CryptographyHelpers.GenerateRandomString(32) }; await db.AddAsync(session);