mirror of
https://github.com/alexhopeoconnor/bom-local-card.git
synced 2026-10-03 22:22:00 +10:00
Fix forecastTime to use API metadata instead of current time
- Use metadata.forecastTime from API response instead of endTime in fetchHistoricalFrames - Ensures forecast time displays correctly in user's browser timezone - Fixes issue where forecast time was showing incorrect timezone
This commit is contained in:
@@ -1300,7 +1300,7 @@ class RadarApiService {
|
|||||||
frames: allFrames,
|
frames: allFrames,
|
||||||
lastUpdated: endTime,
|
lastUpdated: endTime,
|
||||||
observationTime: metadata.observationTime || (newestCacheFolder === null || newestCacheFolder === void 0 ? void 0 : newestCacheFolder.observationTime) || endTime,
|
observationTime: metadata.observationTime || (newestCacheFolder === null || newestCacheFolder === void 0 ? void 0 : newestCacheFolder.observationTime) || endTime,
|
||||||
forecastTime: endTime,
|
forecastTime: metadata.forecastTime || endTime,
|
||||||
weatherStation: metadata.weatherStation,
|
weatherStation: metadata.weatherStation,
|
||||||
distance: metadata.distance,
|
distance: metadata.distance,
|
||||||
cacheIsValid: (_a = metadata.cacheIsValid) !== null && _a !== void 0 ? _a : true,
|
cacheIsValid: (_a = metadata.cacheIsValid) !== null && _a !== void 0 ? _a : true,
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ services:
|
|||||||
# Application configuration
|
# Application configuration
|
||||||
- CACHEDIRECTORY=/app/cache
|
- CACHEDIRECTORY=/app/cache
|
||||||
- CACHERETENTIONHOURS=24
|
- CACHERETENTIONHOURS=24
|
||||||
- TIMEZONE=Australia/Brisbane
|
- TIMEZONE=Australia/Sydney
|
||||||
# Debug output enabled by default for test environment
|
# Debug output enabled by default for test environment
|
||||||
- DEBUG__ENABLED=true
|
- DEBUG__ENABLED=true
|
||||||
- DEBUG__WAITMS=2000
|
- DEBUG__WAITMS=2000
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ export class RadarApiService {
|
|||||||
frames: allFrames,
|
frames: allFrames,
|
||||||
lastUpdated: endTime,
|
lastUpdated: endTime,
|
||||||
observationTime: metadata.observationTime || newestCacheFolder?.observationTime || endTime,
|
observationTime: metadata.observationTime || newestCacheFolder?.observationTime || endTime,
|
||||||
forecastTime: endTime,
|
forecastTime: metadata.forecastTime || endTime,
|
||||||
weatherStation: metadata.weatherStation,
|
weatherStation: metadata.weatherStation,
|
||||||
distance: metadata.distance,
|
distance: metadata.distance,
|
||||||
cacheIsValid: metadata.cacheIsValid ?? true,
|
cacheIsValid: metadata.cacheIsValid ?? true,
|
||||||
|
|||||||
Reference in New Issue
Block a user