Reputation: 554
I have selected 'No limit' then I wrote a simply filter in Logs Viewer console
timestamp>="2020-01-30T15:00:00Z" AND timestamp<="2020-01-30T16:00:00Z"
There is one log for this condition but it returned nothing in the console. When I changed the filter as follows,
timestamp>="2020-01-30T10:00:00Z" AND timestamp<="2020-01-30T16:00:00Z"
it shows me the result for timestamp>="2020-01-30T15:00:00Z" AND timestamp<="2020-01-30T16:00:00Z"
.
And timestamp>="2020-01-30T09:00:00Z" AND timestamp<="2020-01-30T16:00:00Z"
shows result for timestamp>="2020-01-30T14:00:00Z" AND timestamp<="2020-01-30T16:00:00Z"
.
What am I doing wrong?
Upvotes: 0
Views: 427
Reputation: 498
For the base of my answer, I will be using this documentation on advanced logs queries as the document shows you how to write advanced logs queries, which are the expressions that can specify a set of log entries from any number of logs.
To begin, the timestamp field type that you are using permits query value string in RFC 3339 or ISO 8601 format. In your case, you are using the RFC 3339 type.
In query expressions, timestamps in RFC 3339 format can specify a timezone with "Z" or ±hh:mm. Also, timestamps are represented to nanosecond accuracy.
More importantly, when writing a query with a timestamp, you must also select No limit from the time-range selector below the search-query box. Check image below to have a visual.
So overall, there is nothing wrong with your query search:
timestamp>="2020-01-30T15:00:00Z" AND timestamp<="2020-01-30T16:00:00Z"
Just make sure that you have the No limit selected from the time-range selector.
If that still does not work for you, then you can try writing the same query search in a different format, like this:
timestamp >= "2020-01-30T15:00:00Z" timestamp <= "2020-01-30T16:00:00Z"
I hope this helps!
Upvotes: 1