I would like to remove the "GMT-####" text from the results. Date/time results will differ based on the search criteria the user enters.
for (var j = 0; j < resultCountGLM; j++) {
var featureAttributes2 = results[1].features[j].attributes;
//console.log(featureAttributes2)
if (attr = "DATE_UTC") {
attr1 = "Detected during the 1-hour period beginning"
var dateGM = new Date(featureAttributes2[attr]);
resultItems.push("<p class='reportTextResults_font'><b>" + attr1 + ":</b> " + dateGM + "</p>");
}
}
resultItems.push("<br>");
Example Output:
Detected during the 1-hour period beginning: Thu Jan 02 2020 14:00:00 GMT-0600 (Central Standard Time)
Detected during the 1-hour period beginning: Thu Jan 02 2020 16:00:00 GMT-0600 (Central Standard Time)
Desired Output:
Detected during the 1-hour period beginning: Thu Jan 02 2020 14:00:00 (Central Standard Time)
Detected during the 1-hour period beginning: Thu Jan 02 2020 16:00:00 (Central Standard Time)