mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
fix(fires): report a 00:45 UTC detection as 00:45, not "45"
get_active_fires joined FIRMS acq_date and the unpadded acq_time, so a detection at 00:45 UTC came back as "2026-01-01 45". The row now uses acquisitionMsUtc, which pads the time, and reports an ISO UTC timestamp like the other tool times.
This commit is contained in:
1 parent
ac8dc84f3c
commit
57df5f61ba
4 files changed
+24
-3
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import test from 'node:test';
|
||||
import { composeCatalog } from '../catalog.js';
|
||||
import { getActiveFires } from './hazards.js';
|
||||
|
||||
const catalogWith = (fires) =>
|
||||
composeCatalog({
|
||||
tools: [getActiveFires],
|
||||
services: { fires: { getSnapshot: async () => ({ fires }) } },
|
||||
});
|
||||
|
||||
test('a fire acquired at 00:45 UTC reads as 00:45, not "45"', async () => {
|
||||
const result = await catalogWith([
|
||||
{ lat: 24, lon: 121, frp: 5, acqDate: '2026-01-01', acqTime: '45' },
|
||||
]).call('get_active_fires', { area: { bbox: [120, 23, 122, 25] } });
|
||||
assert.equal(result.data.rows[0].acquired, '2026-01-01T00:45:00.000Z');
|
||||
});
|
||||
Reference in new issue
Block a user