diff --git a/src/Tailviewer.Core.Tests/Parsers/TimestampParserTest.cs b/src/Tailviewer.Core.Tests/Parsers/TimestampParserTest.cs index 297aa6972..2dc42c430 100644 --- a/src/Tailviewer.Core.Tests/Parsers/TimestampParserTest.cs +++ b/src/Tailviewer.Core.Tests/Parsers/TimestampParserTest.cs @@ -236,6 +236,21 @@ public void TestTryParse13() timestamp.Should().Be(new DateTime(2019, 7, 8, 16, 18, 58, 381)); } + [Test] + public void TestTryParse14() + { + var parser = new TimestampParser(); + parser.TryParse("19:50:58,998", + out var dateTime) + .Should() + .BeTrue(); + + dateTime.Hour.Should().Be(19); + dateTime.Minute.Should().Be(50); + dateTime.Second.Should().Be(58); + dateTime.Millisecond.Should().Be(998); + } + [Test] public void TestTryParseLongGarbageLine() { diff --git a/src/Tailviewer.Core/Parsers/TimestampParser.cs b/src/Tailviewer.Core/Parsers/TimestampParser.cs index 9e1171b67..9000ca5d3 100644 --- a/src/Tailviewer.Core/Parsers/TimestampParser.cs +++ b/src/Tailviewer.Core/Parsers/TimestampParser.cs @@ -70,6 +70,8 @@ public TimestampParser() // One of the most bizare formats: Time of day is apparently not interesting enough, just as are fractions of a second. // We do, however, get the seconds (in nano seconds) since the start of the application... new TimeOfDaySecondsSinceStartParser(), + + new DateTimeParser("HH:mm:ss,fff"), new DateTimeParser("HH:mm:ss.fff"), new DateTimeParser("HH:mm:ss") )