diff --git a/Iceshrimp.Backend/Core/Database/Tables/Job.cs b/Iceshrimp.Backend/Core/Database/Tables/Job.cs index 87000c52..ee392a87 100644 --- a/Iceshrimp.Backend/Core/Database/Tables/Job.cs +++ b/Iceshrimp.Backend/Core/Database/Tables/Job.cs @@ -34,7 +34,7 @@ public class Job [Column("data")] public string Data { get; set; } = null!; [NotMapped] - public long Duration => (long)((FinishedAt ?? DateTime.Now) - (StartedAt ?? QueuedAt)).TotalMilliseconds; + public long Duration => (long)((FinishedAt ?? DateTime.UtcNow) - (StartedAt ?? QueuedAt)).TotalMilliseconds; - [NotMapped] public long QueueDuration => (long)((StartedAt ?? DateTime.Now) - QueuedAt).TotalMilliseconds; + [NotMapped] public long QueueDuration => (long)((StartedAt ?? DateTime.UtcNow) - QueuedAt).TotalMilliseconds; } \ No newline at end of file diff --git a/Iceshrimp.Backend/Core/Services/QueueService.cs b/Iceshrimp.Backend/Core/Services/QueueService.cs index 20a65e9b..a6f6905c 100644 --- a/Iceshrimp.Backend/Core/Services/QueueService.cs +++ b/Iceshrimp.Backend/Core/Services/QueueService.cs @@ -348,8 +348,8 @@ public class PostgresJobQueue( { var logger = scope.ServiceProvider.GetRequiredService>(); logger.LogTrace("Job in queue {queue} was delayed to {time} after {duration} ms, has been queued since {time}", - name, job.DelayedUntil.Value.ToStringIso8601Like(), job.Duration, - job.QueuedAt.ToStringIso8601Like()); + name, job.DelayedUntil.Value.ToLocalTime().ToStringIso8601Like(), job.Duration, + job.QueuedAt.ToLocalTime().ToStringIso8601Like()); db.Update(job); await db.SaveChangesAsync(token); await RaiseJobDelayedEvent(db);