I've encountered a problem when trying to do a search for obtain records that are current day.
fecha_actual= datetime.strptime(fields.date.context_today(self,cr,uid,context=context), "%Y-%m-%d").date()
fecha_actual = fecha_actual.strftime('%Y-%m-%d')
ingresos = self.search(cr, uid, [('f_ingreso', '>=', fecha_actual+' 00:00:00'),('f_ingreso','<=',fecha_actual+ ' 23:59:59')],context=context)
In trying to make the search only brings back those before 7:00 PM; as if I had my time zone into account for the search.Any idea what might be going?
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 9/11/14, 6:33 PM|
|Seen: 738 times|
|Last updated: 3/16/15, 8:10 AM|