<div dir="ltr">Hi,<div><br></div><div>It's very much expected for seconds to be there if the data is from DB. Can you describe situation in more details? </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Sep 9, 2013 at 6:16 PM, Nathan Cutler <span dir="ltr"><<a href="mailto:presnypreklad@gmail.com" target="_blank">presnypreklad@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
In case anyone is interested, I patched the 'rt' script to fix the problem:<br>
<br>
# diff -u rt.old rt<br>
--- rt.old      2013-08-14 20:46:23.000000000 +0200<br>
+++ rt  2013-09-09 16:06:20.000000000 +0200<br>
@@ -1698,6 +1698,8 @@<br>
         $mon = $month{$monstr} if exists $month{$monstr};<br>
     } elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d):(\d\d)/ ) {<br>
         ($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, $6);<br>
+    } elsif ( /(\d{4})-(\d\d)-(\d\d)\s+(\d\d):(\d\d)/ ) {<br>
+        ($yr, $mon, $day, $hr, $min, $sec) = ($1, $2-1, $3, $4, $5, 0);<br>
     }<br>
     if ( $yr and defined $mon and $day and defined $hr and defined $sec ) {<br>
         return timelocal($sec,$min,$hr,$day,$mon,$yr);<br>
<br>
Now the 'rt list' command works as expected.<br>
<span class="HOEnZb"><font color="#888888"><br>
Nathan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Thu, Sep 5, 2013 at 4:40 PM, Nathan Cutler <<a href="mailto:presnypreklad@gmail.com">presnypreklad@gmail.com</a>> wrote:<br>
> I'm trying to use the 'rt' command line script. It's working, except<br>
> for an annoying error message:<br>
><br>
> $ rt list "status='new'"<br>
> Query:status='new'<br>
> Ticket Owner Queue    Age   Told Status Requestor Subject<br>
> --------------------------------------------------------------------------------<br>
> Unknown date format in parsedate: '2011-09-30 13:44'<br>
><br>
> This "Unknown date format" error is written once for each line of output.<br>
><br>
> Reading the code, I can see that RT is expecting the date format to<br>
> include the seconds, yet in my case the seconds are missing.<br>
><br>
> I can patch the code to add ":00" on the end, but I'm curious to hear<br>
> if others can reproduce this, or any ideas for a proper fix.<br>
><br>
> Thanks!<br>
><br>
> Nathan<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards, Ruslan.
</div>