fix datetime error

This commit is contained in:
mfnefd 2024-06-20 04:17:21 +04:00
parent ff3d4b3824
commit b1d13a591d

View File

@ -43,6 +43,8 @@ namespace BusinessLogic.BusinessLogic
} }
// Хешируем пароль // Хешируем пароль
model.PasswordHash = PasswordHasher.Hash(model.Password!); model.PasswordHash = PasswordHasher.Hash(model.Password!);
model.Birthday = model.Birthday.ToUniversalTime();
var user = _userStorage.Insert(model); var user = _userStorage.Insert(model);
if (user is null) if (user is null)
{ {
@ -103,6 +105,7 @@ namespace BusinessLogic.BusinessLogic
_validate(model); _validate(model);
model.PasswordHash = PasswordHasher.Hash(model.Password!); model.PasswordHash = PasswordHasher.Hash(model.Password!);
model.Birthday = model.Birthday.ToUniversalTime();
var user = _userStorage.Update(model); var user = _userStorage.Update(model);
if (user is null) if (user is null)
{ {