@@ -106,14 +106,14 @@ async fn get_logs(
106106 let date_to = DateTime :: parse_from_rfc3339 ( & query. datetime_to ) . ok ( ) ;
107107
108108 if let Some ( x) = date_from {
109- q. with_date_not_more_recent_than ( x. timestamp_micros ( ) as u64 ) ;
110- } else {
111- let datetime_to = Utc :: now ( ) - Duration :: days ( 1 ) ;
112- q. with_date_not_more_recent_than ( datetime_to. timestamp_micros ( ) as u64 ) ;
109+ q. with_date_more_than ( x. timestamp_micros ( ) as u64 ) ;
113110 }
114111
115112 if let Some ( x) = date_to {
116- q. with_date_not_older_than ( x. timestamp_micros ( ) as u64 ) ;
113+ q. with_date_less_than ( x. timestamp_micros ( ) as u64 ) ;
114+ } else {
115+ let datetime_to = Utc :: now ( ) + Duration :: days ( 1 ) ;
116+ q. with_date_less_than ( datetime_to. timestamp_micros ( ) as u64 ) ;
117117 }
118118
119119 let q = q. build ( ) ;
@@ -159,14 +159,14 @@ async fn get_summary(query: SummaryQuery) -> Result<JournalEntries, JournalError
159159 )
160160 . unwrap ( ) ;
161161
162- let datetime_to = Utc :: now ( ) - Duration :: days ( 5 ) ;
163- let datetime_from = Utc :: now ( ) + Duration :: days ( 1 ) ;
162+ let datetime_from = Utc :: now ( ) - Duration :: days ( 5 ) ;
163+ let datetime_to = Utc :: now ( ) + Duration :: days ( 1 ) ;
164164 let mut qb = QueryBuilder :: default ( ) ;
165165 let q = qb
166166 . with_fields ( vec ! [ "__REALTIME" . into( ) ] )
167167 . with_limit ( 10_000 )
168- . with_date_not_older_than ( datetime_to . timestamp_micros ( ) as u64 )
169- . with_date_not_more_recent_than ( datetime_from . timestamp_micros ( ) as u64 )
168+ . with_date_more_than ( datetime_from . timestamp_micros ( ) as u64 )
169+ . with_date_less_than ( datetime_to . timestamp_micros ( ) as u64 )
170170 . with_priority_above_or_equal_to ( query. priority )
171171 . build ( ) ;
172172
0 commit comments