diff --git a/app/models/user_preference.rb b/app/models/user_preference.rb index ed6de22..b2d336a 100644 --- a/app/models/user_preference.rb +++ b/app/models/user_preference.rb @@ -39,6 +39,9 @@ class UserPreference < ActiveRecord::Base if new_record? && !(attributes && attributes.key?(:hide_mail)) self.hide_mail = Setting.default_users_hide_mail? end + if new_record? && !(attributes && attributes.key?(:time_zone)) + self.time_zone = Setting.default_users_time_zone + end if new_record? && !(attributes && attributes.key?(:no_self_notified)) self.no_self_notified = true end diff --git a/app/views/settings/_authentication.html.erb b/app/views/settings/_authentication.html.erb index 1536781..fd3c65c 100644 --- a/app/views/settings/_authentication.html.erb +++ b/app/views/settings/_authentication.html.erb @@ -41,6 +41,8 @@
<%= setting_check_box :default_users_hide_mail, :label => :field_hide_mail %>
+ +<%= setting_select :default_users_time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :label => :field_time_zone, :blank => :label_none %>