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

GeographicLocationSerializer - incorrect float format #202

Closed
janousek opened this issue Dec 15, 2016 · 4 comments
Closed

GeographicLocationSerializer - incorrect float format #202

janousek opened this issue Dec 15, 2016 · 4 comments

Comments

@janousek
Copy link

var value = g.Latitude.ToString("0.000000") + ";" + g.Longitude.ToString("0.000000");
Does not work like expected when you use culture with comma decimal separator (dot is only allowed separator).
Invariant culture should be specified here
var value = g.Latitude.ToString("0.000000", CultureInfo.InvariantCulture.NumberFormat) + ";" + g.Longitude.ToString("0.000000", CultureInfo.InvariantCulture.NumberFormat);

@rianjs
Copy link
Collaborator

rianjs commented Dec 15, 2016

I'm not sure what you're saying. Which scenario applies to you?

  • Expected: 1,2345 / Actual: 1.2345
  • Expected: 1.2345 / Actual: 1,2345

@janousek
Copy link
Author

The second one.

rianjs added a commit that referenced this issue Dec 15, 2016
…nates

Culture invariant geographic coordinates #202
@rianjs
Copy link
Collaborator

rianjs commented Dec 15, 2016

Fix is in nuget package 2.2.23. Should be indexed in a few minutes.

https://www.nuget.org/packages/Ical.Net

@rianjs
Copy link
Collaborator

rianjs commented Dec 15, 2016

fc90856

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants