Skip to content

Commit cf617cf

Browse files
committed
Force locale that uses period as decimal point instead of comma
1 parent 7f75985 commit cf617cf

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

installer.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "WinDynamicDesktop"
5-
#define MyAppVersion "1.2"
5+
#define MyAppVersion "1.2.1"
66
#define MyAppPublisher "Timothy Johnson"
77
#define MyAppURL "https://github.com/t1m0thyj/WinDynamicDesktop"
88
#define MyAppExeName "WinDynamicDesktop.exe"

src/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.2.0")]
35+
[assembly: AssemblyVersion("1.2.1")]
3636
//[assembly: AssemblyFileVersion("1.0.0.0")]

src/SunriseSunset.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using System.Linq;
44
using System.Text;
55
using System.Threading.Tasks;
6+
using System.Globalization;
67
using Innovative.SolarCalculator;
78

89
namespace WinDynamicDesktop
@@ -15,11 +16,13 @@ public class WeatherData
1516

1617
class SunriseSunsetService
1718
{
19+
private static CultureInfo cultureInfo = CultureInfo.GetCultureInfo("en-US");
20+
1821
public static WeatherData GetWeatherData(string lat, string lon, string dateStr)
1922
{
2023
DateTime date = DateTime.Parse(dateStr);
21-
double latitude = Double.Parse(lat);
22-
double longitude = Double.Parse(lon);
24+
double latitude = Double.Parse(lat, cultureInfo);
25+
double longitude = Double.Parse(lon, cultureInfo);
2326

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

0 commit comments

Comments
 (0)