Describe the Bug
In src/components/PropagationPanel.jsx we have
const isDaytime = new Date().getUTCHours() >= 6 && new Date().getUTCHours() <= 18;
This should be based of the time of the DE station.
In addition, we actually KNOW exactly when sunrise and sunset are, we should use that information.
Going further down the rabbit hole, it appears we are displaying sunrise/sunset (at least in Dockable) in UTC rather than local time.
To Reproduce
Steps to reproduce the behavior:
- Go to 'BAND CONDITIONS', when day/night local does not match UTC
- Note that it shows daylight based on UTC
Expected Behaviour
It should be showing daylight based on the location of the DE station.
So, if we change the above javascript to use currentTime (why go and look it up again when we already have it), AND compare with deSunTimes, that should address the first issue.
The display of the sunrise/sunset in local times should "just" need a conversion to local time. We could simplify this, doing it in one place by adding a local element to deSunTimes, and do similar for dxSunTimes and use that in the display of the dx station information.
Screenshots
Environment
All.
73!
Describe the Bug
In
src/components/PropagationPanel.jsxwe haveThis should be based of the time of the DE station.
In addition, we actually KNOW exactly when sunrise and sunset are, we should use that information.
Going further down the rabbit hole, it appears we are displaying sunrise/sunset (at least in Dockable) in UTC rather than local time.
To Reproduce
Steps to reproduce the behavior:
Expected Behaviour
It should be showing daylight based on the location of the DE station.
So, if we change the above javascript to use
currentTime(why go and look it up again when we already have it), AND compare withdeSunTimes, that should address the first issue.The display of the sunrise/sunset in local times should "just" need a conversion to local time. We could simplify this, doing it in one place by adding a
localelement todeSunTimes, and do similar fordxSunTimesand use that in the display of the dx station information.Screenshots
Environment
All.
73!