LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Date Time ACL in squid for Local time (https://www.linuxquestions.org/questions/linux-server-73/date-time-acl-in-squid-for-local-time-762920/)

thetzawko 10-19-2009 05:37 AM

Date Time ACL in squid for Local time
 
I want to use Date Time ACLs in squid with local time. Not GMT or UTC.
How could I configure it? I also want to see local time in access.log file and squid generated error pages.

Thanks

gilead 10-20-2009 06:58 PM

From what I remember, using acl aclname time [day-abbrevs] [h1:m1-h2:m2] in the squid.conf file used whatever time setting your box did - is your Linux box using GMT or UTC?

As far as parsing the logs goes, it's easier to use a tool like calamaris to generate and format a report. Alternatively, to just pull out the first, fourth and seventh fields of the access log you could do this:
Code:

awk '/192\.168\.1\.20/ {print strftime("%c",$1),$4,$7}' /var/log/squid/access.log


All times are GMT -5. The time now is 04:55 PM.