mirror of
https://github.com/alexhopeoconnor/bom-local-service.git
synced 2026-10-04 03:28:11 +10:00
Remove minutes ago parsing, use UTC timestamps directly
- Refactor TimeParsingService to parse time strings to UTC only - Remove minutesAgo from RadarFrame and FrameMetadata models - Update CaptureFramesStep to extract UTC timestamps directly - Update CacheService to store/load ObservationTime instead of MinutesAgo - Update BomRadarService to use AbsoluteObservationTime directly - Remove all backward compatibility code for old cache folders - Update documentation and test SPA to calculate minutes ago on client - Fix step registration to register concrete types for DI resolution - Fix hosted service registration to use reflection correctly
This commit is contained in:
@@ -63,19 +63,8 @@ public static class ResponseBuilder
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate AbsoluteObservationTime for all frames if metadata is available
|
||||
// AbsoluteObservationTime is already set during capture, no calculation needed
|
||||
// This ensures consistency with the time series endpoint
|
||||
if (metadata != null && metadata.ObservationTime > DateTime.MinValue.AddYears(1))
|
||||
{
|
||||
foreach (var frame in frames)
|
||||
{
|
||||
// Only calculate if not already set and MinutesAgo is valid
|
||||
if (!frame.AbsoluteObservationTime.HasValue && frame.MinutesAgo >= 0)
|
||||
{
|
||||
frame.AbsoluteObservationTime = metadata.ObservationTime.AddMinutes(-frame.MinutesAgo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate NextUpdateTime based on cache status:
|
||||
// - If cache is valid: NextUpdateTime = max(CacheExpiresAt, next background service check)
|
||||
|
||||
Reference in New Issue
Block a user