LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-02-2017, 10:07 PM   #1
forneylloyd@hotmail.com
LQ Newbie
 
Registered: Mar 2017
Posts: 4

Rep: Reputation: Disabled
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?
Attached Thumbnails
Click image for larger version

Name:	SquidErrorPage.jpg
Views:	47
Size:	105.1 KB
ID:	24664   Click image for larger version

Name:	localtime.jpg
Views:	54
Size:	233.3 KB
ID:	24665  
 
Old 04-02-2017, 10:42 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,552

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
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.
Old 04-03-2017, 01:31 AM   #3
forneylloyd@hotmail.com
LQ Newbie
 
Registered: Mar 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-03-2017, 05:51 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 19,552

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
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.
Old 04-03-2017, 08:17 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,643

Rep: Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813Reputation: 1813
@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.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squids 3.5.12 error message page displays the wrong time. forneylloyd@hotmail.com Linux - Newbie 1 04-02-2017 10:30 PM
Evolution calendar displays wrong time for appointments Jlove130 Linux - Desktop 4 04-25-2013 10:47 AM
How to disable or hide error page (message)? megaweak Linux - Newbie 4 11-21-2012 01:03 AM
Time display wrong in web page glowe Linux - Server 3 03-17-2007 11:18 AM
kmail displays wrong time mlezius Linux - General 0 03-12-2003 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration