Fix up times and remove extraneous api inject from NovelList.razor
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-17 22:26:22 -04:00
parent cbf5ec076d
commit 12a1f48fbd
4 changed files with 9 additions and 12 deletions

View File

@@ -72,8 +72,8 @@ public abstract class AbstractScraper : IScraper
ChapterNumber = i + 1,
Url = $"{baseUrl}{node.Attributes["href"].Value}",
Name = node.SelectSingleNode(namexpath).InnerText,
DatePosted = dates.Posted,
DateUpdated = dates.Updated
DatePosted = dates.Posted?.ToUniversalTime(),
DateUpdated = dates.Updated?.ToUniversalTime()
};
});
@@ -93,13 +93,13 @@ public abstract class AbstractScraper : IScraper
protected virtual DateTime GetPostedDate(HtmlDocument document, string baseUrl, string novelUrl)
{
var xpath = DatePostedPattern;
return DateTime.Parse(document.DocumentNode.SelectSingleNode(xpath).InnerText);
return DateTime.Parse(document.DocumentNode.SelectSingleNode(xpath).InnerText).ToUniversalTime();
}
protected virtual DateTime GetLastUpdatedDate(HtmlDocument document, string baseUrl, string novelUrl)
{
var xpath = DateUpdatedPattern;
return DateTime.Parse(document.DocumentNode.SelectSingleNode(xpath).InnerText);
return DateTime.Parse(document.DocumentNode.SelectSingleNode(xpath).InnerText).ToUniversalTime();
}
public Novel ScrapeNovel(string url)