From bb6d36cfd85a870a2538c0526d2fcdc27b663123 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Sun, 6 Aug 2023 13:37:59 -0700 Subject: [PATCH] Updated article to use UTC time --- Newsbot.Collector.Services/Jobs/CodeProjectWatcherJob.cs | 2 +- Newsbot.Collector.Services/Jobs/RssWatcherJob.cs | 2 +- Newsbot.Collector.Services/Jobs/YoutubeWatcherJob.cs | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Newsbot.Collector.Services/Jobs/CodeProjectWatcherJob.cs b/Newsbot.Collector.Services/Jobs/CodeProjectWatcherJob.cs index 1551cbd..3e43f00 100644 --- a/Newsbot.Collector.Services/Jobs/CodeProjectWatcherJob.cs +++ b/Newsbot.Collector.Services/Jobs/CodeProjectWatcherJob.cs @@ -181,7 +181,7 @@ public class CodeProjectWatcherJob Tags = source.Tags, Title = item.Title.Text, Url = itemUrl, - PubDate = item.LastUpdatedTime.DateTime, + PubDate = item.LastUpdatedTime.DateTime.ToUniversalTime(), Thumbnail = parser.Data.Header.Image, Description = item.Title.Text, CodeIsRelease = isRelease, diff --git a/Newsbot.Collector.Services/Jobs/RssWatcherJob.cs b/Newsbot.Collector.Services/Jobs/RssWatcherJob.cs index be35362..c4831ad 100644 --- a/Newsbot.Collector.Services/Jobs/RssWatcherJob.cs +++ b/Newsbot.Collector.Services/Jobs/RssWatcherJob.cs @@ -105,7 +105,7 @@ public class RssWatcherJob Title = post.Title.Text, Tags = FetchTags(post), Url = articleUrl, - PubDate = post.PublishDate.DateTime, + PubDate = post.PublishDate.DateTime.ToUniversalTime(), Thumbnail = meta.Data.Header.Image, Description = meta.Data.Header.Description, SourceId = sourceId diff --git a/Newsbot.Collector.Services/Jobs/YoutubeWatcherJob.cs b/Newsbot.Collector.Services/Jobs/YoutubeWatcherJob.cs index 325847c..5fc5077 100644 --- a/Newsbot.Collector.Services/Jobs/YoutubeWatcherJob.cs +++ b/Newsbot.Collector.Services/Jobs/YoutubeWatcherJob.cs @@ -56,7 +56,9 @@ public class YoutubeWatcherJob private void Execute() { - var sources = _source.ListByType(SourceTypes.YouTube, 100); + var totalSources = _source.TotalByTypeAsync(SourceTypes.YouTube); + + var sources = _source.ListByType(SourceTypes.YouTube, 0); foreach (var source in sources) { @@ -165,7 +167,7 @@ public class YoutubeWatcherJob Title = post.Title.Text, Tags = FetchTags(post), Url = articleUrl, - PubDate = post.PublishDate.DateTime, + PubDate = post.PublishDate.DateTime.ToUniversalTime(), Thumbnail = videoDetails.Data.Header.Image, Description = videoDetails.Data.Header.Description, SourceId = sourceId,