Skip to content

Commit

Permalink
Force locale that uses period as decimal point instead of comma
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0thyj committed Jun 21, 2018
1 parent 7f75985 commit cf617cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "WinDynamicDesktop"
#define MyAppVersion "1.2"
#define MyAppVersion "1.2.1"
#define MyAppPublisher "Timothy Johnson"
#define MyAppURL "https://github.com/t1m0thyj/WinDynamicDesktop"
#define MyAppExeName "WinDynamicDesktop.exe"
Expand Down
2 changes: 1 addition & 1 deletion src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.0")]
[assembly: AssemblyVersion("1.2.1")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
7 changes: 5 additions & 2 deletions src/SunriseSunset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Globalization;
using Innovative.SolarCalculator;

namespace WinDynamicDesktop
Expand All @@ -15,11 +16,13 @@ public class WeatherData

class SunriseSunsetService
{
private static CultureInfo cultureInfo = CultureInfo.GetCultureInfo("en-US");

public static WeatherData GetWeatherData(string lat, string lon, string dateStr)
{
DateTime date = DateTime.Parse(dateStr);
double latitude = Double.Parse(lat);
double longitude = Double.Parse(lon);
double latitude = Double.Parse(lat, cultureInfo);
double longitude = Double.Parse(lon, cultureInfo);

SolarTimes solarTimes = new SolarTimes(date, latitude, longitude);

Expand Down

0 comments on commit cf617cf

Please sign in to comment.