From 1a6a8fcca2e8b7675a74bef1de528a653906b2ca Mon Sep 17 00:00:00 2001 From: itiller Date: Wed, 17 Feb 2016 14:09:49 +0100 Subject: [PATCH] Fix geolocation for cultures that have a different separator for decimals This fixes the geolocation for cultures like the Dutch culture that separate decimals with a comma instead of a point. --- Source/Shared/EventBuilder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Shared/EventBuilder.cs b/Source/Shared/EventBuilder.cs index fb268d92..328cf150 100644 --- a/Source/Shared/EventBuilder.cs +++ b/Source/Shared/EventBuilder.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Globalization; using System.Linq; using Exceptionless.Plugins; using Exceptionless.Extensions; @@ -117,7 +118,7 @@ public EventBuilder SetGeo(double latitude, double longitude) { if (longitude < -180.0 || longitude > 180.0) throw new ArgumentOutOfRangeException("longitude", "Must be a valid longitude value between -180.0 and 180.0."); - Target.Geo = latitude.ToString("#0.0#######") + "," + longitude.ToString("#0.0#######"); + Target.Geo = latitude.ToString("#0.0#######", CultureInfo.InvariantCulture) + "," + longitude.ToString("#0.0#######", CultureInfo.InvariantCulture); return this; }