Skip to content

Commit

Permalink
Update profileeditor.js
Browse files Browse the repository at this point in the history
from sulka nightscout#7833
  • Loading branch information
marionbarker authored Jan 18, 2023
1 parent dd60591 commit 3212af4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/profile/profileeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,20 @@ var init = function init () {
$('#pe_delay_high').val(c_profile.delay_high);
$('#pe_delay_medium').val(c_profile.delay_medium);
$('#pe_delay_low').val(c_profile.delay_low);
timezoneInput.val(c_profile.timezone);

// find the right zone regardless of string case

var foundCase = c_profile.timezone;

if (foundCase != "") {
var lcZone = c_profile.timezone.toLowerCase();

client.ctx.timezones.forEach(function testCase(tz) {
if (tz.toLowerCase() == lcZone) foundCase = tz;
});
}

timezoneInput.val(foundCase);

var index;
[ { prefix:'pe_basal', array:'basal' },
Expand Down

0 comments on commit 3212af4

Please sign in to comment.