Skip to content

Commit

Permalink
Changed DateTime.TryParse style to DateTimeStyles.None
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRadch committed Jul 22, 2020
1 parent c2b0aaf commit af5c447
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TurnerSoftware.SitemapTools/Parser/XmlSitemapParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private SitemapIndexEntry ParseSitemapIndex(XmlNode sitemapNode)
}
else if (nodeName.Equals("lastmod", StringComparison.InvariantCultureIgnoreCase))
{
if (DateTime.TryParse(nodeValue, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var tmpLastModified))
if (DateTime.TryParse(nodeValue, CultureInfo.InvariantCulture, DateTimeStyles.None, out var tmpLastModified))
{
result.LastModified = tmpLastModified;
}
Expand All @@ -101,7 +101,7 @@ private SitemapEntry ParseSitemapEntry(XmlNode urlNode)
}
else if (nodeName.Equals("lastmod", StringComparison.InvariantCultureIgnoreCase))
{
if (DateTime.TryParse(nodeValue, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var tmpLastModified))
if (DateTime.TryParse(nodeValue, CultureInfo.InvariantCulture, DateTimeStyles.None, out var tmpLastModified))
{
result.LastModified = tmpLastModified;
}
Expand Down

0 comments on commit af5c447

Please sign in to comment.