Skip to content
Browse files

DateTime fixes

- Set default time zone to be Pacific Time
- In goals only show the date, not the time
  • Loading branch information...
1 parent 6ef0dde commit 62257bce8e101ebaac334da58c23c6e3522d4978 @mwahab committed Mar 20, 2012
Showing with 2 additions and 1 deletion.
  1. +1 −1 app/admin/goals.rb
  2. +1 −0 config/application.rb
View
2 app/admin/goals.rb
@@ -19,7 +19,7 @@
show :title => "" do
attributes_table_for goal do
row("Status") { status_tag(goal.state) }
- row("Due Date") { goal.duedate ? pretty_format(goal.duedate) : 'N/A' }
+ row("Due Date") { goal.duedate ? pretty_format(goal.duedate.to_date) : 'N/A' }
row("Member") { link_to(goal.member.name, admin_member_path(goal.member)) }
row("Updated By") { goal.admin_user }
row("Goal") { goal.body }
View
1 config/application.rb
@@ -28,6 +28,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 = 'Pacific Time (US & Canada)'
# 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]

0 comments on commit 62257bc

Please sign in to comment.
Something went wrong with that request. Please try again.