LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 10: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, 11:22 AM   #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, 12: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, 12:27 PM   #4
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 36
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, 12: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, 12: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, 01: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 01:19 PM.
 
Old 11-18-2003, 01: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, 01: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, 02: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



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 12:55 PM
Timezone All Over The World Xa! General 0 11-01-2004 09:41 AM
timezone problem Lord Zoltar Linux - General 5 09-13-2004 10:38 PM
KDE timezone JCdude2525 Linux - Software 1 08-14-2004 09:00 PM
Timezone Again rch LQ Suggestions & Feedback 5 05-19-2003 11:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:35 AM.

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