CUAHSI / CUAHSI/HydroDesktop

HydroModeler - error in SolarRadiation model

Open
#49 0 comments 0 reactions 0 assignees View on GitHub
CodePlex
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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.