Skip to content

Commit 1bc4ada

Browse files
committed
updated time zones
1 parent 8d9f357 commit 1bc4ada

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/controllers/stats_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
class StatsController < ApplicationController
22

33
def index
4-
@stats = Stat.order(commits: :desc)
4+
@stats = Stat.order(commits: :desc)
5+
@updated_at = Stat.first
56
end
67

78
private

app/views/stats/index.html.erb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<div class="col-lg-12 text-center">
6363
<h1>1507 Git Commit Race</h1>
6464
<p class="lead">Compete with the best - who will have the most commits when Turing is over?</p>
65+
<p> Results as of: <%= @updated_at.created_at %>
6566
</div>
6667
</div>
6768
</div>
@@ -74,7 +75,7 @@
7475
<table class="table">
7576
<tr>
7677
<td>Name</td>
77-
<td>Commits</td>
78+
<td>Commits(YTD)</td>
7879
</tr>
7980
<% @stats.each do |stat| %>
8081
<tr>

config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Application < Rails::Application
1414

1515
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
1616
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17-
# config.time_zone = 'Central Time (US & Canada)'
17+
config.time_zone = 'Mountain Time (US & Canada)'
1818

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

0 commit comments

Comments
 (0)