Skip to content

Commit

Permalink
Fixed bug on date parser in AzureLogParser
Browse files Browse the repository at this point in the history
  • Loading branch information
gtryf committed Aug 21, 2015
1 parent e2d0801 commit ccc05c7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Sitecore.LogAnalyzer;
using System;
using System.Globalization;
using Sitecore.LogAnalyzer.Extenstions;

namespace LD.Sitecore.LogAnalyzer.Modules.Azure.Parsing
{
Expand All @@ -29,7 +30,7 @@ public override LogEntry ParseLine(string line, DateTime startDateTime, TextStor
DateTime result;
if (index + 18 >= line.Length) return null;
var candidate = line.Substring(index, 19);
if (!DateTime.TryParseExact(candidate, "dd-MM-yyyy HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.None, out result))
if (!DateTime.TryParseExact(candidate, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture, DateTimeStyles.None, out result))
return null;

index = ParserHelper.GoToNextWord(line, index + 19);
Expand Down

0 comments on commit ccc05c7

Please sign in to comment.