Show the world time on the HUD clock

The HUD's UTC and collection readouts follow the world clock with the sky,
so away from live they read the time the globe is drawn at.
This commit is contained in:
Sameh Khamis committed 2026-11-01 23:17:53 -08:00
1 parent 3534398771
commit 9faec3028e
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -337,12 +337,12 @@ export function createWorldClock({
/**
* The page's world clock. Layers, the sky and a host all read this one. The
* sky, satellites (and the launched missions flying on their time) and
* launches have a time of their own and move with it; weather holds each
* product it shows.
* sky and the HUD's clock show the world time; satellites (and the launched
* missions flying on their time) and launches have a time of their own and
* move with it; weather holds each product it shows.
*/
export const worldClock = createWorldClock({
follow: ['sky', 'satellites', 'rocket-launches'],
follow: ['sky', 'hud', 'satellites', 'rocket-launches'],
});
/** The time layer `id` draws at on the page's clock. */
+1 -1
View File
@@ -67,7 +67,7 @@ test('layers named at creation follow from the start', () => {
test('the page clock moves the layers with a time of their own', async () => {
const { worldClock } = await import('./worldClock.js');
for (const id of ['sky', 'satellites', 'rocket-launches'])
for (const id of ['sky', 'hud', 'satellites', 'rocket-launches'])
assert.equal(worldClock.follows(id), true, id);
for (const id of ['flights', 'military', 'vessels', 'transit'])
assert.equal(worldClock.follows(id), false, id);