Skip to content

Commit 908565f

Browse files
committed
Use 'active_support/time' to fetch current time in bin/setup
1 parent e848661 commit 908565f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bin/setup

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env ruby
22
require "fileutils"
3+
require "active_support/time"
34

45
APP_ROOT = File.expand_path("..", __dir__)
56
APP_NAME = "coderdojo-jp"
@@ -29,7 +30,7 @@ FileUtils.chdir APP_ROOT do
2930
system! 'bin/rails dojos:update_db_by_yaml'
3031
system! 'bin/rails dojo_event_services:upsert'
3132

32-
today = Time.zone.today
33+
today = Time.now.in_time_zone('Tokyo').to_date
3334
from = (today - 90).strftime('%Y%m')
3435
to = today.prev_month.strftime('%Y%m')
3536
if ENV['DOORKEEPER_API_TOKEN']

0 commit comments

Comments
 (0)