[rt-users] Query in script not working

Mathew Snyder mathew.snyder at gmail.com
Mon Feb 25 14:28:39 EST 2008



Stephen Turner wrote:
> Quoting Mathew Snyder <mathew.snyder at gmail.com>:
> 
>> I've got the dates working.  However, the tickets retrieved are still
>> based on
>> the day starting at 05:00:00 and ending the following morning at the
>> same time.
>> How can I tell it to only return tickets from between 00:00:00 and
>> 23:59:00?
>>
>> Mathew
>>
>>
> 
> You are actually getting the tickets you want - the dates are stored in the
> database as GMT and so appear different by 5 hours from what you see on the
> screen. It looks a bit strange, but it works fine.
> 
> BTW - what was the problem that you fixed with the dates?
> 
> Steve

Honestly, I haven't a clue.  I commented out the lines that create the date
my @date = (localtime(time-86400)[3 .. 5];
my $yesterday = join "-", ($date[2] + 1900, (sprintf '%02d',$date[1] + 1),
(sprintf '%02d', $date[0]));
and entered a static date for $yesterday.  I also changed the quotes on the
query to being doubles on the outside and singles on the inside.  After I found
the script to work I reverted the changes and uncommented the above lines.  It
has been returning properly since.

Is there a way to shift the timestamp so as to avoid any confusion?

-- 
Keep up with me and what I'm up to: http://theillien.blogspot.com



More information about the rt-users mailing list