Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Setting time zone

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
smith.norton
Posts: 79
Joined: 2007-05-15 12:16

Setting time zone

#1 Post by smith.norton »

I am using Debian to host Apache web server. So it doesn't have GNome or KDE desktop. I can work only from the console.

Whenever I enter the 'date' command, I get the output in UTC. I want to set my own time-zone and I want the 'date' command to show the output for that particular time zone. (say, EST).

How can this be done?

Thanks in advance!

User avatar
kink
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 248
Joined: 2006-01-02 16:47
Location: Utrecht, The Netherlands
Been thanked: 1 time

#2 Post by kink »

Try the command:

Code: Select all

tzselect

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#3 Post by Harold »

Man pages are your friends!

date -R

smith.norton
Posts: 79
Joined: 2007-05-15 12:16

#4 Post by smith.norton »

Thanks for the reply. Actually, I had checked the man pages and 'date -R' was not serving my purpose. What I want is that when I simply give the date command, it should print the date in the current time zone.

smith.norton
Posts: 79
Joined: 2007-05-15 12:16

#5 Post by smith.norton »

I get the following error when I enter the tzselect command.

tzselect
/usr/bin/tzselect: line 53: /usr/share/zoneinfo/iso3166.tab: No such file or directory
/usr/bin/tzselect: time zone files are not set up correctly

The directory /usr/share/zoneinfo is not present in my system. How can I get them? apt-get install something?

smith.norton
Posts: 79
Joined: 2007-05-15 12:16

#6 Post by smith.norton »

apt-get install tzdata solved my problem. Thanks all of you for your help.

Post Reply