fix: never use parse time as event or collection time

Dump data is always historical. Parsers stamped undated events with
time.Now() (Inspur component.log memory/fan status, IDL/H3C SEL with
unparsable time, NVIDIA summary/bug-report, generic, XigmaNAS, Unraid,
Redfish replay warnings), so an August dump opened in September showed
DIMM warnings dated the day of analysis.

- Events without a source time keep a zero timestamp.
- Yearless syslog timestamps take the year from the collection time via
  parser.ParseYearlessInDefaultArchiveLocation; zero when unknown.
- Archive/uploaded-snapshot collected_at is no longer defaulted to now;
  only live API collection uses the current time.

ADL-070.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Mikhail ChusavitinandClaude Opus 5.5 committed 2026-09-28 13:00:53 +03:00
1 parent 8794e0adec
commit f2ad0aca96
19 files changed
+95 -85

No files matched your search

+2 -2
View File
@@ -32,7 +32,7 @@ func ParseSummaryJSON(content []byte) []models.Event {
}
events := make([]models.Event, 0)
timestamp := time.Now() // Use current time as we don't have exact timestamps in summary
var timestamp time.Time // summary has no per-entry time; stamped with CollectedAt later
for _, entry := range entries {
// Only create events for failures or warnings
@@ -61,7 +61,7 @@ func ParseSummaryCSV(content []byte) []models.Event {
}
events := make([]models.Event, 0)
timestamp := time.Now()
var timestamp time.Time // summary has no per-entry time; stamped with CollectedAt later
// Skip header row
for i, record := range records {