This bit me:

$ cat t1.rb
t = Time.now
ENV['TZ'] = 'America/Los_Angeles'
puts t.getlocal
puts t.sec
ENV['TZ'] = 'Europe/Madrid'
puts t.getlocal

$ ruby t1.rb
Fri Dec 31 16:28:14 PST 2004
14
Fri Dec 31 16:28:14 PST 2004

$ cat t2.rb
t = Time.now
ENV['TZ'] = 'America/Los_Angeles'
puts t.getlocal
puts t.getlocal.sec
ENV['TZ'] = 'Europe/Madrid'
puts t.getlocal

$ ruby t2.rb
Fri Dec 31 16:28:24 PST 2004
24
Sat Jan 01 01:28:24 CET 2005

Looking at the code in time.c, it's clear that time_sec() indirectly 
calls either time_localtime() or time_gmtime(), both of which modify the 
receiver. Is this side effect intended? If so, should the documentation 
be updated? It was a bit of a suprise to me.

Happy New Year to everyone in Rubyland.

Steve