Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
![Reply](https://www.linuxquestions.org/questions/images/buttons/reply.gif) |
04-02-2017, 10:07 PM
|
#1
|
LQ Newbie
Registered: Mar 2017
Posts: 4
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
Squids 3.5.12 error message page displays the wrong time.
How do I change the time environment variable not to use GMT but the local time. I have Ubuntu Server 16.04 installed and Squid 3.5.12. When I go to a website this is restricted or denied an Error page is generated and at the bottom of the Error Page Squid generates the following message: Generated Mon, 03 Apr 2017 01:14:53 GMT by The*Proxy (squid/3.5.12). My time is Los Angeles and my current time is Local time is now: Sun Apr 2 18:01:55 PDT 2017. Current default time zone: 'America/Los_Angeles' But if you notice the message generated by Squid, it not only is 6 hours ahead of my time but that actual date is off.
I read where I could add a line in the ~/.bashrc, TZ='America/Los_Angeles'; export TZ, that did not work. I read where the TZ environment variable could be changed. The problems is I don't know how to change the Time or TZ environment variable.
But it is obvious that the Squid Proxy Software is using GMT and my local machine is using local time. I am also using ntp and ntpdate, both are using the correct time. Can you help me?
|
|
|
04-02-2017, 10:42 PM
|
#2
|
Moderator
Registered: Aug 2002
Posts: 26,472
|
Actually PDT UTC offset is -7:00 hours not -6:00 and the date with respect to UTC is correct. squid uses UTC (GMT) by default. Technically the computer is always using UTC but the date and logs convert to local time based on the time zone configuration.
http://wiki.squid-cache.org/SquidFaq...error_messages.
|
|
1 members found this post helpful.
|
04-03-2017, 01:31 AM
|
#3
|
LQ Newbie
Registered: Mar 2017
Posts: 4
Original Poster
Rep: ![Reputation: Disabled](https://www.linuxquestions.org/questions/images/reputation/reputation_off.gif)
|
This is what I understand: Squid, by default, uses GMT as timestamp in all generated error messages. This to allow the cache to participate in a hierarchy of caches in different timezones without risking confusion about what the time is...
My question is, Buy allowing the cache to participate in different timezones, should I not change this setting, is it okay to leave the setting at its default?
Thanks for your help, I am new to Linux.
Lloyd
|
|
|
04-03-2017, 05:51 AM
|
#4
|
Moderator
Registered: Aug 2002
Posts: 26,472
|
It is just how time is being displayed nothing more.
A quick look through the squid.conf did not find a setting to change the error message time stamp. You can change the log time format if desired.
|
|
1 members found this post helpful.
|
04-03-2017, 08:17 AM
|
#5
|
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,219
|
@OP
Quote:
When I go to a website this is restricted or denied an Error page is generated and at the bottom of the Error Page Squid generates the following message: Generated Mon, 03 Apr 2017 01:14:53 GMT by The*Proxy (squid/3.5.12). My time is Los Angeles and my current time is Local time is now: Sun Apr 2 18:01:55 PDT 2017. Current default time zone: 'America/Los_Angeles' But if you notice the message generated by Squid, it not only is 6 hours ahead of my time but that actual date is off.
|
According to this, you only need to change %T to %t in the aprpriate error page (that is ERR_ACCESS_DENIED in your case)
Regards
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 04:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|