From: matz@... (Yukihiro Matsumoto) Date: 2000-09-08T08:28:32+09:00 Subject: [ruby-talk:03246] Re: Bug in Time Hi, In message "[ruby-talk:03159] Bug in Time" on 00/06/07, Andrew Hunt writes: |While doing the regression tests for class Time (RubyUnit is |a wonderful thing!), I came across an odd problem: | | p Time.local(2001, 4, 1).to_s | |Results in: | | Sat Mar 31 23:00:00 EST 2001 | |This happens with all years from 1988 on, with a TZ of CST or EST. Oops, I forgot to support daylight saving time. That's partly because Japan has no such time shift. |Might it be simpler to use the platform's mktime() function to |avoid these issues? (I believe that's a Posix-ism). mktime(3) only handles localtime. I'll fix it to calculate time based on UTC. matz.