LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-18-2003, 11:33 AM   #1
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
machine timezone


I have looked all through the date man page, cant seem to figure out how to change my server from mountain time to Eastern time. any suggestions?
 
Old 11-18-2003, 12:22 PM   #2
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
Change

/etc/localtime

it's usually a symlink to someplace else.

ls -l it go to that directory and look for
the timezone that appeals to you and
replace the symlink in /etc with a new
one pointing to your brand new
timezone
 
Old 11-18-2003, 01:13 PM   #3
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Original Poster
Rep: Reputation: 30
in my distro the timezone file is not a link at all, it's just machine code when i cat it.
 
Old 11-18-2003, 01:27 PM   #4
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 34
Something is not right here. The system clock is set to UTC.
System time routines use the environment variable TZ to correct UTC to the locale, using a C routine called localtime() -- which looks up the TZ variable.

All process are on the same "timezone" page because they all have done something like this:
Code:
TZ=MST7MDT
export TZ
What do you see when you type:
Code:
echo $TZ
 
Old 11-18-2003, 01:35 PM   #5
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Original Poster
Rep: Reputation: 30
when i do an echo $TZ i get a line feed and nothing else.
 
Old 11-18-2003, 01:54 PM   #6
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
What do you mean it's not a link?
if you cat a symlink it will cat the file the
symlink points to.

What is the output of
ls -l /etc/localtime

TZ isn't defined for me either.
 
Old 11-18-2003, 02:18 PM   #7
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Original Poster
Rep: Reputation: 30
-rw-r--r-- 1 root root 1279 Jun 26 02:11 /etc/localtime


#file /etc/localtime
/etc/localtime: timezone data

Last edited by sopiaz57; 11-18-2003 at 02:19 PM.
 
Old 11-18-2003, 02:24 PM   #8
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
Check to see if you have

/usr/share/zoneinfo/

You can do what your Distro
apparently did and just cp the
right file from there.
 
Old 11-18-2003, 02:43 PM   #9
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Original Poster
Rep: Reputation: 30
Ok i have that zoneinfo directory with tons of time zones in it, as well as an America folder with different cities. So I should copy one of these files to /etc/timezone?
 
Old 11-18-2003, 03:09 PM   #10
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
yes, cp your desired timezone file to /etc/localtime

or

you can create a symlink
ln -sf /usr/share/.../my_tz /etc/localtime
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
timezone problem Mathsniper Linux - Newbie 9 06-08-2005 01:55 PM
Timezone All Over The World Xa! General 0 11-01-2004 10:41 AM
timezone problem Lord Zoltar Linux - General 5 09-13-2004 11:38 PM
KDE timezone JCdude2525 Linux - Software 1 08-14-2004 10:00 PM
Timezone Again rch LQ Suggestions & Feedback 5 05-20-2003 12:49 AM


All times are GMT -5. The time now is 09:13 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration