Class: Time

Inherits:
Object show all
Defined in:
lib/joffice/kernel/time.rb

Instance Method Summary collapse

Instance Method Details

#append_gmt(gmt, dst = true) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/joffice/kernel/time.rb', line 25

def append_gmt(gmt, dst=true)
	t=self
	time=(t.utc? ? t : Time.utc(t.year, t.month, t.day, t.hour, 0, 0))
	return time.getlocal if gmt.nil?

	(gmt+=1) if dst

	(self + (3600*gmt) )		
end

#truncate_utcObject



20
21
22
23
# File 'lib/joffice/kernel/time.rb', line 20

def truncate_utc
	time=getutc
	Time.utc(time.year, time.month, time.day, 0, 0, 0) 			
end