year to timestamp

This commit is contained in:
Evan Burkey 2025-03-10 09:16:17 -07:00
parent bdbc19f78c
commit 999b4f884b

View File

@ -66,6 +66,7 @@ func parse(lines []string, i int) (Game, int, error) {
return g, i, fmt.Errorf("failed to extract timestamp from %s", lines[i]) return g, i, fmt.Errorf("failed to extract timestamp from %s", lines[i])
} }
g.Timestamp, err = time.Parse("1/2 15:04:05.000", ts) g.Timestamp, err = time.Parse("1/2 15:04:05.000", ts)
g.Timestamp = time.Date(time.Now().Year(), g.Timestamp.Month(), g.Timestamp.Day(), g.Timestamp.Hour(), g.Timestamp.Minute(), g.Timestamp.Second(), 0, time.UTC)
if err != nil { if err != nil {
return g, i, err return g, i, err
} }