Fix timezone

This commit is contained in:
Tanner Collin 2022-04-16 20:51:41 +00:00
parent 890d02a616
commit 9157ff6da1

View File

@ -144,7 +144,7 @@ function SolarPower({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue'> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue'>
<Label value='Midnight' offset={7} position='top' /> <Label value='Midnight' offset={7} position='top' />
</ReferenceLine> </ReferenceLine>
@ -190,7 +190,7 @@ function OutsideTemperature({end, duration}) {
<Label value='Freezing' offset={7} position='bottom' /> <Label value='Freezing' offset={7} position='bottom' />
</ReferenceLine> </ReferenceLine>
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'
@ -234,7 +234,7 @@ function NookTemperature({end, duration}) {
<Label value='Freezing' offset={7} position='bottom' /> <Label value='Freezing' offset={7} position='bottom' />
</ReferenceLine> </ReferenceLine>
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'
@ -278,7 +278,7 @@ function BedroomTemperature({end, duration}) {
<Label value='Freezing' offset={7} position='bottom' /> <Label value='Freezing' offset={7} position='bottom' />
</ReferenceLine> </ReferenceLine>
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'
@ -298,7 +298,7 @@ function SeedsTemperature({end, duration}) {
return ( return (
<ChartContainer <ChartContainer
name='Seeds Temperature' name='Garden Temperature'
data={data} data={data}
lastFormatter={(x) => x.temperature_C?.toFixed(1) + ' °C'} lastFormatter={(x) => x.temperature_C?.toFixed(1) + ' °C'}
loading={loading} loading={loading}
@ -327,7 +327,7 @@ function SeedsTemperature({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine yAxisId='left' x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine yAxisId='left' x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'
@ -379,7 +379,7 @@ function Thermostat({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'
@ -437,7 +437,7 @@ function Gas({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine yAxisId='right' x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine yAxisId='right' x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Bar <Bar
yAxisId='left' yAxisId='left'
@ -495,7 +495,7 @@ function Water({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine yAxisId='right' x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine yAxisId='right' x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Bar <Bar
yAxisId='left' yAxisId='left'
@ -545,7 +545,7 @@ function LivingRoomDust({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'
@ -585,7 +585,7 @@ function BedroomSleep({end, duration}) {
separator=': ' separator=': '
/> />
<ReferenceLine x={moment().startOf('day').toISOString().replace('.000', '')} stroke='blue' /> <ReferenceLine x={moment().tz('America/Edmonton').startOf('day').toISOString().replace('.000', '')} stroke='blue' />
<Line <Line
type='monotone' type='monotone'