Skip to content

Commit

Permalink
Fixed parsing of timestamps with non-zero padded days (#841)
Browse files Browse the repository at this point in the history
Signed-off-by: Emanuele Vicentini <emanuele.vicentini@shopify.com>
  • Loading branch information
baldowl authored Aug 29, 2024
1 parent 8d9157c commit 5e63bbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func parseStatus(data sql.RawBytes) (float64, bool) {
case "non-primary", "disconnected":
return 0, true
}
if ts, err := time.Parse("Jan 02 15:04:05 2006 MST", string(data)); err == nil {
if ts, err := time.Parse("Jan _2 15:04:05 2006 MST", string(data)); err == nil {
return float64(ts.Unix()), true
}
if ts, err := time.Parse(time.DateTime, string(data)); err == nil {
Expand Down

0 comments on commit 5e63bbe

Please sign in to comment.