[squid-users] logformat %tl and %tg are same.

Amos Jeffries squid3 at treenet.co.nz
Thu Jan 12 11:27:39 UTC 2017


On 12/01/2017 8:43 p.m., Mimiko wrote:
> Hello.
> 
> I use Squid Cache: Version 3.1.20
> 
> In order to view the log in a readable format I use this:
> 
> logformat squid %{%Y/%m/%d %H:%M:%S}tl %ts.%03tu %6tr %>a %Ss/%03>Hs
> %<st %rm %ru %un %Sh/%<A %mt
> 
> The problem is that the time in log is in GMT despite of %tl option.
> Server is configured to local time. Squid for both, %tl and %tg, shows
> same time.
> 
> What could be the problem?

The problem is very probably that "Server is configured to local time".

Local time is a political value decided by your countries government,
politicos get to change it whenever they please. And some countries do
play around with it for ridiculous reasons - mine for example changed
local daylight savings time recently so the national sports game can be
played during daylight and broadcast "outside of work hours". So
essentially what time our whole country sees now depends on the
corporate owners of sports stadiums deciding when the games occur. :-(

Internet connected machinery (ie everything nowdays) is supposed to be
using UTC. It would not be a good situation for two adjacent machines to
display for example, ping times of 12hrs just because their admin wanted
different _displays_ on their calendar applications (eg maintained by
people in different countries).

By setting your server to use "local time" (whatever that may be for
you) you are making it tell Squid that GMT == local time.

Your proxy is probably also getting very confused about cacheability of
things because the objects timestamps delivered are always off by
whatever your governments local timezone differential is.


The right thing to do is make your machines operate with UTC and only
use local time for *display* purposes to humans.

Amos



More information about the squid-users mailing list