diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-26 12:07:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-05-26 12:07:56 +0000 |
commit | 189be55235b75c32908a4037825b453513673e64 (patch) | |
tree | a1bfcc244fa32c7e326487d145ec1b6232d51a5b /app/models/user.rb | |
parent | 84084b01689718ea901dcd66d66ab676c7bc4790 (diff) | |
download | redmine-189be55235b75c32908a4037825b453513673e64.tar.gz redmine-189be55235b75c32908a4037825b453513673e64.zip |
Fixed time zone issues introduced by r9719 (#10996).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9726 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r-- | app/models/user.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb index e59c752b2..904420315 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -370,6 +370,15 @@ class User < Principal end end + # Returns the day of +time+ according to user's time zone + def time_to_date(time) + if time_zone.nil? + time.to_date + else + time.in_time_zone(time_zone).to_date + end + end + def logged? true end |