diff --git a/src/components/DataPanel.js b/src/components/DataPanel.js index 5dd4fe9..a13fd34 100644 --- a/src/components/DataPanel.js +++ b/src/components/DataPanel.js @@ -99,7 +99,7 @@ const mapStateToProps = (state) => { // get county name countyName = selectedCountyAttrs.name; // date hardcoded for now until we add slider - const recentSnapshot = selectedCountySnapshots['2020-04-22T07:00:00.000Z']; + const recentSnapshot = selectedCountySnapshots['2020-04-22T00:00:00.000Z']; totalDeaths = recentSnapshot.deaths; totalCases = recentSnapshot.cases; } diff --git a/src/datasets/datasetsUtils.js b/src/datasets/datasetsUtils.js index f182165..b94f3da 100644 --- a/src/datasets/datasetsUtils.js +++ b/src/datasets/datasetsUtils.js @@ -83,6 +83,8 @@ export function tidyUsafactsCounties(counties = [], countType) { // cache a map of dates => iso dates const snapshotDatesIso = snapshotDates.reduce((acc, snapshotDate) => { const snapshotDateObj = new Date(Date.parse(snapshotDate)); + // clear out time zone + snapshotDateObj.setUTCHours(0, 0, 0, 0); const snapshotDateIso = snapshotDateObj.toISOString(); acc[snapshotDate] = snapshotDateIso;