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,
|
||||
lastUpdated: endTime,
|
||||
observationTime: metadata.observationTime || (newestCacheFolder === null || newestCacheFolder === void 0 ? void 0 : newestCacheFolder.observationTime) || endTime,
|
||||
forecastTime: endTime,
|
||||
forecastTime: metadata.forecastTime || endTime,
|
||||
weatherStation: metadata.weatherStation,
|
||||
distance: metadata.distance,
|
||||
cacheIsValid: (_a = metadata.cacheIsValid) !== null && _a !== void 0 ? _a : true,
|
||||
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
# Application configuration
|
||||
- CACHEDIRECTORY=/app/cache
|
||||
- CACHERETENTIONHOURS=24
|
||||
- TIMEZONE=Australia/Brisbane
|
||||
- TIMEZONE=Australia/Sydney
|
||||
# Debug output enabled by default for test environment
|
||||
- DEBUG__ENABLED=true
|
||||
- DEBUG__WAITMS=2000
|
||||
|
||||
@@ -154,7 +154,7 @@ export class RadarApiService {
|
||||
frames: allFrames,
|
||||
lastUpdated: endTime,
|
||||
observationTime: metadata.observationTime || newestCacheFolder?.observationTime || endTime,
|
||||
forecastTime: endTime,
|
||||
forecastTime: metadata.forecastTime || endTime,
|
||||
weatherStation: metadata.weatherStation,
|
||||
distance: metadata.distance,
|
||||
cacheIsValid: metadata.cacheIsValid ?? true,
|
||||
|
||||
Reference in New Issue
Block a user