Class: Time

Inherits:
Object show all
Defined in:
lib/gems/rubyforge-1.0.1/lib/rubyforge/client.rb

Overview

clean up warnings caused by web servers that send down 2 digit years

Class Method Summary collapse

Class Method Details

.old_utcObject



9
10
11
12
13
# File 'lib/gems/rubyforge-1.0.1/lib/rubyforge/client.rb', line 9

def utc(*args)
  century = Time.now.year / 100 * 100
  args[0] += century if args[0] < 100
  old_utc(*args)
end

.utc(*args) ⇒ Object



11
12
13
14
15
# File 'lib/gems/rubyforge-1.0.1/lib/rubyforge/client.rb', line 11

def utc(*args)
  century = Time.now.year / 100 * 100
  args[0] += century if args[0] < 100
  old_utc(*args)
end