[PATCH] Searches like Created = 'YYYY-MM-DD'(was: [rt-users] Query Problem)

Ruslan Zakirov ruslan.zakirov at gmail.com
Sat Jul 30 16:49:37 EDT 2005


Ok, here what we get:
* I enter '2005-07-30' in search box
* Time::ParseDate converts it to '2005-07-29 20:00' because of GMT+4 timezone
* Then constuct search with interval ['2005-07-29 00:00'; '2005-07-29 23:59']

I think if we play only with dates then we should ignore timezone, so
I propose attached patch.

Olivier, could you confirm that patch fixes your problem?

On 7/28/05, Olivier Horec <olivier.horec at gmail.com> wrote:
> I had a look at the SQL queries about the date problem.
> 
> In fact, when I search with a query like : Created = '2005-07-19',
> I find this in the SQL log :
> ( ( (main.Created >= '2005-07-18 00:00')AND(main.Created <=
> '2005-07-18 23:59') ) )
> 
> Has anyone an idea ?
> 
> Olivier
> 
> 2005/7/28, Ruslan Zakirov <ruslan.zakirov at gmail.com>:
> > On 7/28/05, Olivier Horec <olivier.horec at gmail.com> wrote:
> > > Hi,
> > >

[snip]

> > > The second problem is when you search tickets with dates : you get the
> > > tickets one day before the query.
> > >
> > > Has anyone tried to solve the problem or can anyone give me some ideas
> > > to help me to solve it.
> > >
> > > Thanks in advance
> > >
> > > Olivier
> > > _______________________________________________
> > > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> > >
> > > Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> > >
> >
> >
> > --
> > Best regards, Ruslan.
> >
> 


-- 
Best regards, Ruslan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: search_on_date.patch
Type: text/x-patch
Size: 479 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20050731/01c3d1c5/attachment.bin>


More information about the rt-users mailing list