Skip to content

Commit

Permalink
fixed timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhsmt committed Jan 29, 2014
1 parent f28149f commit e183942
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/data_controller.rb
Expand Up @@ -46,7 +46,7 @@ def download
end
csvData.encode(Encoding::SJIS)

filename = getCategoryName(category) + "_" + Time.now.strftime('%Y%m%d%H%M%S') + ".csv"
filename = getCategoryName(category) + "_" + Time.zone.now.strftime('%Y%m%d%H%M%S') + ".csv"
# csv to stream
send_data csvData, filename: filename

Expand Down
1 change: 1 addition & 0 deletions config/application.rb
Expand Up @@ -15,6 +15,7 @@ class Application < Rails::Application
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
config.time_zone = 'Tokyo'

# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
Expand Down

0 comments on commit e183942

Please sign in to comment.