year to timestamp
This commit is contained in:
parent
bdbc19f78c
commit
999b4f884b
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user