Skip to content

Commit

Permalink
chore: update bitcoin statistic time zone (#1775)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabbitz authored Apr 11, 2024
1 parent 0e4ba07 commit 41696de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/bitcoin_statistic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class BitcoinStatistic < ApplicationRecord
def self.refresh
transaction do
current_time = Time.current
start_time = Time.new(current_time.year, current_time.month, current_time.day, current_time.hour, current_time.min < 30 ? 0 : 30)
start_time = Time.zone.local(current_time.year, current_time.month, current_time.day, current_time.hour, current_time.min < 30 ? 0 : 30)

Check warning on line 7 in app/models/bitcoin_statistic.rb

View check run for this annotation

Codecov / codecov/patch

app/models/bitcoin_statistic.rb#L7

Added line #L7 was not covered by tests
end_time = start_time + 30.minutes

# Count the number of newly generated addresses within half an hour before the current time point
Expand Down

0 comments on commit 41696de

Please sign in to comment.