LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Grafpup
User Name
Password
Grafpup This forum is for the discussion of Grafpup Linux.

Notices


Reply
  Search this Thread
Old 06-12-2007, 05:45 AM   #1
emlsnws
LQ Newbie
 
Registered: May 2007
Location: UK
Distribution: Grafpup
Posts: 28

Rep: Reputation: 15
Timezone issues


I have had problems with timezones like this:

The 'date' command reported initially the 'PUP' timezone which I think comes from 'vanilla Puppy' and is probably down to BK himself. That's all fine, but I'm in the UK and wanted to run a server which is permanently set to UTC (ie. GMT).

So I investigated the /etc/TZ file. I tried setting /etc/TZ to UTC but it didn't seem to do anything. This is probably because UTC is not recognised - ie. listed in /usr/share/zoneinfo - but GMT+0 is.

So I set /etc/TZ to read 'GMT+0' and now the CMOS clock setting is reported correctly by the 'date' command.

Then there were 2 issues remaining:

1. I run cron (Vixie cron 4.1 locally compiled from source). However, the shell scripts I run from cron, report timestamped messages (simply using the 'date' command) in a separate log file. These messages were all 8 hours out.

EDIT: Old stuff removed. The correct solution is to do the following (if you're in GMT):

Code:
cp /usr/share/zoneinfo/GMT+0 /etc/localtime
That fixes the cron time zone problem.

2. Some daemons that I run during startup, which were added to the /etc/rc.d/rc.services file (sshd, thttpd and others) report periodically into the /var/log/messages file. Their messages have a timestamp of 8 hours ahead, followed by the string 'GMT-8'. I think the root cause of this is that when the daemon was started in rc.local the TZ variable was undefined (blank) or perhaps still set to the 'PUP-8' value.

Perhaps the rewriting of /etc/localtime above will fix the problems after a reboot (ie. the daemons concerned are restarted). I'm not brave enough to restart them all individually, especially sshd, when working on an ssh connection!


I'll report back here as usual.
Simon.

Last edited by emlsnws; 06-12-2007 at 06:50 AM.
 
Old 06-12-2007, 06:51 AM   #2
emlsnws
LQ Newbie
 
Registered: May 2007
Location: UK
Distribution: Grafpup
Posts: 28

Original Poster
Rep: Reputation: 15
Just a note to say I've edited out all the garbage above and replaced it with the correct solution for the cron timezone. This pops it to the top again.
Simon.
 
Old 06-13-2007, 09:36 AM   #3
emlsnws
LQ Newbie
 
Registered: May 2007
Location: UK
Distribution: Grafpup
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Perhaps the rewriting of /etc/localtime above will fix the problems after a reboot (ie. the daemons concerned are restarted). I'm not brave enough to restart them all individually, especially sshd, when working on an ssh connection!
It all worked out fine after a few hours. The daemons which report occasionally in /var/log/messages all eventually picked up the correct timezone. No reboot required :-)

Simon.
 
  


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
updating legacy PPC RHEL 3.0 for timezone update issues Devilotx Linux - Server 1 03-09-2007 01:04 PM
timezone problem Mathsniper Linux - Newbie 9 06-08-2005 12:55 PM
timezone problem Lord Zoltar Linux - General 5 09-13-2004 10:38 PM
machine timezone sopiaz57 Linux - General 9 11-18-2003 02:09 PM
Timezone Again rch LQ Suggestions & Feedback 5 05-19-2003 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Grafpup

All times are GMT -5. The time now is 07:10 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
Open Source Consulting | Domain Registration