ruby1.9 compatibility

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4601 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-01-01 11:13:33 +00:00
parent d3a926df64
commit 9748567452
1 changed files with 2 additions and 0 deletions

View File

@ -283,6 +283,8 @@ module Redmine
# convert a date/time into the CVS-format # convert a date/time into the CVS-format
def time_to_cvstime(time) def time_to_cvstime(time)
return nil if time.nil? return nil if time.nil?
return Time.now if time == 'HEAD'
unless time.kind_of? Time unless time.kind_of? Time
time = Time.parse(time) time = Time.parse(time)
end end