From: Joel VanderWerf Date: 2006-10-09T03:33:35+09:00 Subject: Re: In the year 2525 Bill Kelly wrote: > From: >> >> It's definitely an incompatibility, though, in the sense that it has >> the potential to create a category of programs that will run under >> JRuby but not (original) Ruby. > > I did have a surprise like this, just a couple days ago: > > Linux: > > $ ruby -ve 'p Time.now.strftime("%F %T")' > ruby 1.8.4 (2005-12-24) [i686-linux] > "2006-10-07 19:05:01" > > Windows: > > > ruby -ve 'p Time.now.strftime("%F %T")' > ruby 1.8.4 (2005-12-24) [i386-mswin32] > " " Thanks for the warning. The moral of the story is trust ri more than man, if you care about portability: [~] ri strftime | grep '%[FT]' [~] man strftime | grep '%[FT]' Reformatting strftime(3), please wait... %F Equivalent to %Y-%m-%d (the ISO 8601 date format). (C99) ing the seconds, see %T below. %T The time in 24-hour notation (%H:%M:%S). (SU) %F conversion is in C99 and POSIX 1003.1-2001. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407