Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double to str conversion fix #3

Merged
merged 1 commit into from
Dec 18, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AdysTech.InfluxDB.Client.Net/InfluxDBClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public async Task<bool> PostValueAsync(string dbName, string measurement, long t
new KeyValuePair<string, string>("precision", precisionLiterals[(int) precision])
}).ReadAsStringAsync ();

var content = String.Format ("{0},{1} {2}={3} {4}", measurement, tags, field, value, timestamp);
var content = String.Format (System.Globalization.CultureInfo.GetCultureInfo("en-US"), "{0},{1} {2}={3} {4}", measurement, tags, field, value, timestamp);
ByteArrayContent requestContent = new ByteArrayContent (Encoding.UTF8.GetBytes (content));
HttpResponseMessage response = await PostAsync (builder, requestContent);

Expand Down Expand Up @@ -295,7 +295,7 @@ public async Task<bool> PostValuesAsync(string dbName, string measurement, long
// content.AppendFormat ("{0},{1} {2} {3}\n", measurement, tags, value, timestamp);
////remove last \n
//content.Remove (content.Length - 1, 1);
var valuesTxt=String.Join (",", values.Select (v => String.Format ("{0}={1}", v.Key, v.Value)));
var valuesTxt=String.Join (",", values.Select (v => String.Format (System.Globalization.CultureInfo.GetCultureInfo("en-US"), "{0}={1}", v.Key, v.Value)));
var content = String.Format ("{0},{1} {2} {3}", measurement, tags, valuesTxt, timestamp);

ByteArrayContent requestContent = new ByteArrayContent (Encoding.UTF8.GetBytes (content.ToString ()));
Expand Down