From a36091ec88217bfd242e4d3d388d28ebce3a1434 Mon Sep 17 00:00:00 2001 From: jeffyanta Date: Mon, 11 May 2026 07:22:06 -0400 Subject: [PATCH] Update getLatestHistoricalTime so latest historical data point is always included --- ocp/rpc/currency/historical_data.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocp/rpc/currency/historical_data.go b/ocp/rpc/currency/historical_data.go index c943e6e..ee0196b 100644 --- a/ocp/rpc/currency/historical_data.go +++ b/ocp/rpc/currency/historical_data.go @@ -300,6 +300,6 @@ func getTimeRangeForPredefinedRange(predefinedRange currencypb.PredefinedRange, func getLatestHistoricalTime() time.Time { secondsInUpdateInterval := int64(timePerHistoricalUpdate / time.Second) queryTimeUnix := time.Now().Unix() - queryTimeUnix = queryTimeUnix - (queryTimeUnix % secondsInUpdateInterval) + queryTimeUnix = queryTimeUnix - (queryTimeUnix % secondsInUpdateInterval) + secondsInUpdateInterval return time.Unix(queryTimeUnix, 0) }