Skip to content

Commit dce09c0

Browse files
committed
Merge pull request #80 from InlineAsm/master
Fix geolocation for cultures that have a different separator for decimals
2 parents 28e1085 + 1a6a8fc commit dce09c0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/Shared/EventBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3+
using System.Globalization;
34
using System.Linq;
45
using Exceptionless.Plugins;
56
using Exceptionless.Extensions;
@@ -117,7 +118,7 @@ public EventBuilder SetGeo(double latitude, double longitude) {
117118
if (longitude < -180.0 || longitude > 180.0)
118119
throw new ArgumentOutOfRangeException("longitude", "Must be a valid longitude value between -180.0 and 180.0.");
119120

120-
Target.Geo = latitude.ToString("#0.0#######") + "," + longitude.ToString("#0.0#######");
121+
Target.Geo = latitude.ToString("#0.0#######", CultureInfo.InvariantCulture) + "," + longitude.ToString("#0.0#######", CultureInfo.InvariantCulture);
121122
return this;
122123
}
123124

0 commit comments

Comments
 (0)