Skip to content

Commit 467a615

Browse files
committed
Use UTC time for request params
1 parent e86a09a commit 467a615

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/statistics/client.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ def initialize
121121
def fetch_events(group_id:, since_at: nil, until_at: nil)
122122
params = {
123123
fields: %i(attending_count start_time owner),
124-
limit: 100,
125-
since: since_at,
126-
until: until_at
127-
}.compact
124+
limit: 100
125+
}.tap do |h|
126+
h[:since] = (since_at.utc + since_at.utc_offset).to_i if since_at
127+
h[:until] = (until_at.utc + until_at.utc_offset).to_i if until_at
128+
end
128129

129130
events = []
130131

0 commit comments

Comments
 (0)