On Tue, Jun 05, 2012 at 06:06:09PM +1000, Stuart Browne wrote:
> When doing a TicketSQL search similar to the following:
> 
>       Status = 'open' AND Due <= '10am tomorrow'
> 
> The time portion of the string isn't taken into account.
> 
> On the command line, a quick test of Time::DateParse shows it works:
> 
> ]# perl -e 'use Time::ParseDate; print parsedate("2012-06-06 10:00") . "\n"; 
> print parsedate("10am tomorrow") . "\n";'
> 1338940800
> 1338940800
> 
> So it appears as if RT is parsing the date string of 'Due' and messing with 
> it.  Using the time portion before or after, using 10am vs 10:00, none appear 
> to work.  Using any time component has the same result (thinking it may be a 
> timezone issue. It wasn't).
> 
> I can't see in the RT code where this might be happening (been looking in 
> SQL.pm).  Can someone point me in the right direction?

RT actually passes a number of arguments to parsedate:

grep can find where it's called (not in SQL.pm)

$ grep -r Time::ParseDate::parsedate lib/
lib/RT/Articles.pm:        my $seconds = Time::ParseDate::parsedate( 
$args{$date}, FUZZY => 1, PREFER_PAST => 1 );
lib/RT/Date.pm:        my $date = Time::ParseDate::parsedate(

-kevin

Attachment: pgpWp0481D8n8.pgp
Description: PGP signature

Reply via email to