parser: fallback zone-less source timestamps to Europe/Moscow

This commit is contained in:
2026-02-28 22:17:00 +03:00
parent 25e3b8bb42
commit 0252264ddc
7 changed files with 53 additions and 19 deletions

View File

@@ -559,7 +559,7 @@ func parseSyslogLine(line string) (time.Time, string, models.Severity) {
// Parse timestamp (add current year)
year := time.Now().Year()
if ts, err := time.Parse("Jan 2 15:04:05 2006", timeStr+" "+strconv.Itoa(year)); err == nil {
if ts, err := parser.ParseInDefaultArchiveLocation("Jan 2 15:04:05 2006", timeStr+" "+strconv.Itoa(year)); err == nil {
timestamp = ts
}
}