CUAHSI / HydroDesktop

HydroDesktop is a free and open source GIS enabled desktop application that helps you search for, download, visualize, and analyze hydrologic and climate data registered with the CUAHSI Hydrologic Information System. HydroDesktop is part of the legacy CUAHSI toolkit and is not under active development. Click the "releases" link below to download the latest installer for Microsoft Windows.
73 stars 20 forks source link

HydroModeler - error in SolarRadiation model #49

Open xhqiao89 opened 7 years ago

xhqiao89 commented 7 years ago

jirikadlec2[CodePlex]
My quotRegional and Language Settingsquot on my computer is Czech. When I run the SolarRadiation model in HydroModeler, I get an unhandled exception in nsr.c line 167 in the date time conversion part:

int Dm = Convert.ToInt32(current_time.Split('/')[1]); //the day of the month int M = Convert.ToInt32(current_time.Split('/')[0]); //the month int Y = Convert.ToInt32(current_time.Split('/')[2]); //the year

This code doesn't work in non-English regional language / date format settings because in some settings the quot.quot is used instead of quot/quot for the year/day/month separator.