Question 25
Scenario 3
You are provided with a Gzipped Apache log file from a website having the below data in each row.
The fields are separated by spaces and quoted by double quotes ("). Unlike CSV files, quoted fields are escaped via "and not". All data is in the GMT-0500 timezone and the questions were based in this same time zone.
Use the information given and answer the sub-questions.
Note: Assume that you are using Python codes for log analysis
How would you identify log entries where the time is between 16:00 and 18:59 on Sundays?
Check if 16 <= timestamp.hour < 18
Check if 16 <= timestamp.hour < 19
Check if 16 < timestamp.hour < 19
Check if timestamp.hour in range(16, 20)