Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue Oct 05, 2004 6:22 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
While the hosts keep good time for the Linodes using ntp, it is important that you set the correct timezone for your Linode. Here's how:

The timezone under Linux is set by a symbolic link from /etc/localtime to a file in the /usr/share/zoneinfo directory that corresponds with what timezone you are in.

Code:
# ls /usr/share/zoneinfo/

Africa      Cuba     GMT0         Japan      Poland      UCT
America     EET      GMT-0        Kwajalein  Portugal    Universal
Antarctica  Egypt    GMT+0        Libya      posix       US
Arctic      Eire     Greenwich    MET        posixrules  UTC
Asia        EST      Hongkong     Mexico     PRC         WET
Atlantic    EST5EDT  HST          Mideast    PST8PDT     W-SU
Australia   Etc      Iceland      MST        right       zone.tab
Brazil      Europe   Indian       MST7MDT    ROC         Zulu
Canada      Factory  Iran         Navajo     ROK
CET         GB       iso3166.tab  NZ         Singapore
Chile       GB-Eire  Israel       NZ-CHAT    SystemV
CST6CDT     GMT      Jamaica      Pacific    Turkey


Code:
# ls /usr/share/zoneinfo/US/

Alaska    Arizona  Eastern       Hawaii          Michigan  Pacific
Aleutian  Central  East-Indiana  Indiana-Starke  Mountain  Samoa


For example, I want to set my Linux install to use US/Central timezone, so I would execute the following:

Code:
ln -sf /usr/share/zoneinfo/US/Central /etc/localtime


By default, the distros are set up for US/Eastern (I believe). Setting your correct timezone helps spread out the load when all the cron jobs fire off in the early mornings. Please do this. ;)

Code:
ln -sf /usr/share/zoneinfo/your/zone /etc/localtime


Thanks,
-Chris


Last edited by caker on Thu Apr 02, 2009 3:01 pm, edited 1 time in total.

Top
   
PostPosted: Fri Jul 01, 2005 5:09 am 
Offline
Senior Newbie
User avatar

Joined: Fri Jun 10, 2005 3:57 am
Posts: 5
Website: http://www.hoeg.com/blog
WLM: peterhoeg@hotmail.com
Location: Denmark
The friendly way to do this (at least under Debian - not sure if it works the same way in other dists):

Code:
# tzconfig
Your current time zone is set to Europe/Copenhagen
Do you want to change that? [n]:


Press "y" and then simply answer the questions.


Top
   
 Post subject:
PostPosted: Mon Aug 14, 2006 7:41 am 
Offline
Senior Newbie

Joined: Mon Aug 14, 2006 7:13 am
Posts: 7
tzconfig also works for Ubuntu (not suprisingly)

Also, "timeconfig" serves the same purpose in slackware.


Top
   
 Post subject:
PostPosted: Mon Aug 14, 2006 7:52 am 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
Since this has been bumped up, I thought I'd mention that Gentoo has a similar utility called tzselect. Just run it and answer the questions (contintent, country, and if asked, city). I'm not sure which other distros this one is available on, though.


Top
   
 Post subject:
PostPosted: Mon Aug 14, 2006 8:23 pm 
Offline
Senior Member
User avatar

Joined: Fri Aug 15, 2003 2:15 pm
Posts: 111
Website: http://fubegra.net/
Maybe I'm a bit of a contrarian here, but I run my Linode on UTC. This completely eliminates any ambiguity (e.g. daylight savings).

_________________
Bus error (passengers dumped)


Top
   
 Post subject: ubuntu 8.04
PostPosted: Sun Mar 15, 2009 5:47 am 
Offline
Senior Newbie

Joined: Sun Mar 08, 2009 11:51 pm
Posts: 7
just a note, my server running ubuntu 8.04 does not use tzconfig but rather tzselect


Top
   
 Post subject:
PostPosted: Fri Dec 04, 2009 9:06 am 
Offline
Senior Newbie

Joined: Sun Oct 18, 2009 4:47 pm
Posts: 14
Location: Toronto, Canada
I think 'dpkg-reconfigure tzdata' popped up when I first updated the repository lists and upgraded for the first time on my fresh Ubuntu linode. That's how I updated it...

_________________
Liberal Party of Canada FTW!


Top
   
PostPosted: Mon May 03, 2010 6:30 am 
Offline
Senior Newbie

Joined: Tue Apr 27, 2010 9:57 am
Posts: 8
I would like to set the timezone using StackScript. (for Ubuntu distributions)

How do I do so?
From many of the guides in the library:
E.g.:
http://library.linode.com/server-monito ... .10-karmic

Quote:
dpkg-reconfigure tzdata


How do I tell it to select a specific timezone?
May be by some parameters?

Or chaning the symlinks did the same way?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group