[backend/core] Code cleanup
This commit is contained in:
parent
7eb220b43d
commit
579f8c233a
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ public static class IdHelpers
|
|||
|
||||
public static string GenerateSnowflakeId(DateTime? createdAt = null)
|
||||
{
|
||||
if (createdAt?.Kind is not null and not DateTimeKind.Utc)
|
||||
if (createdAt is { Kind: not DateTimeKind.Utc })
|
||||
createdAt = createdAt.Value.ToUniversalTime();
|
||||
|
||||
createdAt ??= DateTime.UtcNow;
|
||||
|
|
Loading…
Add table
Reference in a new issue