[rt-users] CLI question
Nathan Cutler
presnypreklad at gmail.com
Mon Sep 9 10:16:45 EDT 2013
In case anyone is interested, I patched the 'rt' script to fix the problem:
# diff -u rt.old rt
--- rt.old 2013-08-14 20:46:23.000000000 +0200
+++ rt 2013-09-09 16:06:20.000000000 +0200
@@ -1698,6 +1698,8 @@
$mon = $month{$monstr} if exists $month{$monstr};
} elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d):(\d\d)/ ) {
($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, $6);
+ } elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d)/ ) {
+ ($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, 0);
}
if ( $yr and defined $mon and $day and defined $hr and defined $sec ) {
return timelocal($sec,$min,$hr,$day,$mon,$yr);
Now the 'rt list' command works as expected.
Nathan
On Thu, Sep 5, 2013 at 4:40 PM, Nathan Cutler <presnypreklad at gmail.com> wrote:
> I'm trying to use the 'rt' command line script. It's working, except
> for an annoying error message:
>
> $ rt list "status='new'"
> Query:status='new'
> Ticket Owner Queue Age Told Status Requestor Subject
> --------------------------------------------------------------------------------
> Unknown date format in parsedate: '2011-09-30 13:44'
>
> This "Unknown date format" error is written once for each line of output.
>
> Reading the code, I can see that RT is expecting the date format to
> include the seconds, yet in my case the seconds are missing.
>
> I can patch the code to add ":00" on the end, but I'm curious to hear
> if others can reproduce this, or any ideas for a proper fix.
>
> Thanks!
>
> Nathan
More information about the rt-users
mailing list