scm: cvs: strict string type and timezone in cvstime.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5460 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
80e2eed702
commit
50fe1ecc18
|
@ -335,12 +335,12 @@ 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'
|
time = 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
|
||||||
return time.strftime("%Y-%m-%d %H:%M:%S")
|
return time_to_cvstime_rlog(time)
|
||||||
end
|
end
|
||||||
|
|
||||||
def time_to_cvstime_rlog(time)
|
def time_to_cvstime_rlog(time)
|
||||||
|
|
Loading…
Reference in New Issue