Skip to content

Commit 6da2ee7

Browse files
authored
Merge pull request #20 from piXel-m/feature/Json_Number_Format_Bug_Fix
Fix JSON output bug: Apply culture invariant to time
2 parents eccb1d7 + 56c10cb commit 6da2ee7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Serilog.Sinks.Splunk/Sinks/Splunk/EventCollectorRequest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515

1616
using System;
17+
using System.Globalization;
1718
using System.Net.Http;
1819
using System.Text;
1920

@@ -49,7 +50,7 @@ internal SplunkEvent(string logEvent, string source, string sourceType, string h
4950

5051
if (time > 0)
5152
{
52-
jsonPayLoad = jsonPayLoad + @",""time"":" + time;
53+
jsonPayLoad = jsonPayLoad + @",""time"":" + time.ToString(CultureInfo.InvariantCulture);
5354
}
5455

5556
jsonPayLoad = jsonPayLoad + "}";

0 commit comments

Comments
 (0)