Skip to content

Commit b0b64cb

Browse files
auxtenzserge
authored andcommittedApr 29, 2019
Fix Month and year duration (zserge#3)
1 parent 5a5d84c commit b0b64cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎metric.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ func newTimeseries(builder func() metric, frame string) *timeseries {
345345
'h': time.Hour,
346346
'd': time.Hour * 24,
347347
'w': time.Hour * 24 * 7,
348-
'M': time.Hour * 24 * 7 * 30,
349-
'y': time.Hour * 24 * 7 * 365,
348+
'M': time.Hour * 24 * 30,
349+
'y': time.Hour * 24 * 365,
350350
}
351351
fmt.Sscanf(frame, "%d%c%d%c", &totalNum, &totalUnit, &intervalNum, &intervalUnit)
352352
interval := units[intervalUnit] * time.Duration(intervalNum)

0 commit comments

Comments
 (0)
Please sign in to comment.