Jesse Vincent wrote: > On Wed, Apr 05, 2006 at 03:32:12PM -0500, Rick Russell wrote: >> Jason Fenner wrote: >>> use POSIX(strftime); >> Be careful! RT uses a default PERL package called CTime that includes >> its own versions of strftime, localtime, etc. > Huh?
Sorry for the "huh"-worthy comment :-) When I attempted to use common time functions like localtime & strftime in my custom scripts, I found that I was getting unpredictable results. Careful debugging revealed the strftime was rarely barfing with an error because the output of localtime was not what it expected. I suspect that the problem was a conflict between CTime & POSIX modules: http://search.cpan.org/~nwclark/perl-5.8.8/ext/POSIX/POSIX.pod http://search.cpan.org/~muir/Time-modules-2003.1126/lib/Time/CTime.pm which has a version of localtime that returns a different data structure than POSIX localtime. Or maybe it was pulling the wrong version of strftime instead. Is RT dependent on CTime? I'm not really sure. The POSIX module is a default for sure. Either way, the problem went away when I referred to the functions explicitly as POSIX::localtime & POSIX::strftime. BTW, I read _RT Essentials_. I liked it, but I wish there was more coverage of scripting and the various data structures in RT. Figuring out what data structures are associated with tickets & transactions is often an exercise in trial-and-error. Rick R.
begin:vcard fn:Rick Russell n:Russell;Rick email;internet:[EMAIL PROTECTED] tel;work:713-348-5267 tel;fax:713-348-6099 tel;cell:281-686-1884 x-mozilla-html:FALSE version:2.1 end:vcard
_______________________________________________ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: [EMAIL PROTECTED] Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com We're hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html
