Skip to content

Commit

Permalink
Fix time conversion for year (#775)
Browse files Browse the repository at this point in the history
* 365 days in a year, not 356

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
  • Loading branch information
arkodg authored Dec 6, 2024
1 parent d36a71b commit 44de8d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/utilities.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func UnitToDivider(unit pb.RateLimitResponse_RateLimit_Unit) int64 {
case pb.RateLimitResponse_RateLimit_MONTH:
return 60 * 60 * 24 * 30
case pb.RateLimitResponse_RateLimit_YEAR:
return 60 * 60 * 24 * 356
return 60 * 60 * 24 * 365
}

panic("should not get here")
Expand Down

0 comments on commit 44de8d9

Please sign in to comment.