diff --git a/Iceshrimp.Backend/Core/Services/NoteService.cs b/Iceshrimp.Backend/Core/Services/NoteService.cs index 7a55be2e..37f2f0d8 100644 --- a/Iceshrimp.Backend/Core/Services/NoteService.cs +++ b/Iceshrimp.Backend/Core/Services/NoteService.cs @@ -964,11 +964,11 @@ public class NoteService( return null; } - if (note.PublishedAt is null or { Year: < 2007 } || note.PublishedAt > DateTime.Now + TimeSpan.FromMinutes(5)) + if (note.PublishedAt is null or { Year: < 2007 } || note.PublishedAt > DateTime.UtcNow + TimeSpan.FromDays(3)) throw GracefulException.UnprocessableEntity("Note.PublishedAt is nonsensical"); - if (note.PublishedAt > DateTime.Now) - note.PublishedAt = DateTime.Now; + if (note.PublishedAt > DateTime.UtcNow) + note.PublishedAt = DateTime.UtcNow; if (replyUri != null) { @@ -1087,13 +1087,13 @@ public class NoteService( throw GracefulException.Forbidden("User is suspended"); if (dbNote.UpdatedAt != null && dbNote.UpdatedAt > updatedAt) throw GracefulException.UnprocessableEntity("Note update is older than last known version"); - if (updatedAt.Year < 2007 || updatedAt > DateTime.Now + TimeSpan.FromMinutes(5)) + if (updatedAt.Year < 2007 || updatedAt > DateTime.UtcNow + TimeSpan.FromDays(3)) throw GracefulException.UnprocessableEntity("updatedAt is nonsensical"); if (actor.Host == null) throw GracefulException.UnprocessableEntity("User.Host is null"); - if (note.UpdatedAt > DateTime.Now) - note.UpdatedAt = DateTime.Now; + if (note.UpdatedAt > DateTime.UtcNow) + note.UpdatedAt = DateTime.UtcNow; var mentionData = await ResolveNoteMentionsAsync(note);