HydroModeler - error in SolarRadiation model
- Dominant language
- C#
- Stars
- 76
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open nsr.c at line 167 and inspect the SolarRadiation date-time conversion shown in the issue. Reproduce the model with a non-English regional date format, including Czech settings, and verify that date conversion no longer raises an unhandled exception when the separator differs from '/'.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, localization
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100