[rt-users] CLI question

Ruslan Zakirov ruz at bestpractical.com
Wed Sep 11 16:30:57 EDT 2013


Hi,

It's very much expected for seconds to be there if the data is from DB. Can
you describe situation in more details?


On Mon, Sep 9, 2013 at 6:16 PM, Nathan Cutler <presnypreklad at gmail.com>wrote:

> 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
>



-- 
Best regards, Ruslan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20130912/8972c0fb/attachment.htm>


More information about the rt-users mailing list