We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcd881d commit 70d7327Copy full SHA for 70d7327
src/LinkDotNet.Blog.Web/Features/BlogPostPublisher.cs
@@ -43,10 +43,12 @@ private async Task PublishScheduledBlogPosts()
43
using var scope = serviceProvider.CreateScope();
44
var repository = scope.ServiceProvider.GetRequiredService<IRepository<BlogPost>>();
45
46
- var now = DateTime.UtcNow;
+ var now = DateTime.Now;
47
var scheduledBlogPosts = await repository.GetAllAsync(
48
filter: b => b.ScheduledPublishDate != null && b.ScheduledPublishDate <= now);
49
50
+ logger.LogInformation("Found {Count} scheduled blog posts.", scheduledBlogPosts.Count);
51
+
52
foreach (var blogPost in scheduledBlogPosts)
53
{
54
blogPost.Publish();
0 commit comments