CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  What is the best way to setup Time?

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  ZaNaToS
      ZaNaToS
What is the best way to setup Time?
#1
Peeking in the Member Window
Joined: 2007/8/23
From
Posts: 20
Hello,

I'm very confused with the date/zone thing.

I'm located in Greece so our time zone is GMT+2.

question 1:

through cento's setup should I setup the timezone to GMT+2? or Europe/Athens ???
what is the difference?

question 2:
I've setup both system and hardware time to GMT+2:

[root@server httpdocs]# date
Fri Nov 6 14:25:31 GMT+2 2009

[root@server httpdocs]# hwclock
Fri 06 Nov 2009 02:25:49 PM GMT+2 -0.000358 seconds

but when I use a php (echo date("l, F d, Y h:i" ,time());) file to show the date and time I get :
Friday, November 06, 2009 05:25

it adds +3 hours...i dont know why.

question 3:

In /etc/sysconfig/clock I have:

ZONE="Etc/GMT+2"
UTC=false


should I turn UTC on ?
Posted on: 2009/11/6 12:36
Create PDF from Post Print
Top
  •  pschaff
      pschaff
Re: What is the best way to setup Time?
#2
Moderator
Joined: 2006/12/13
From Tidewater Virginia, North America
Posts: 3404
Don't know about Greece, but in the US we have daylight savings time that adjusts the time +/- an hour in the Spring and Fall, but some states do things differently than others across our 4 major time zones in the continental US, never mind Alaska, Hawaii and "possessions" such as Puerto Rico. The "political" settings, as opposed to GMT+delta, take the local peculiarities into account and adjust the clock appropriately. You may have something similar. As far as the UTC setting, this is generally used on *nix systems like Linux to keep the hardware clock on GMT/UTC and display the system time as the local time in applications.

If you are dual-boot with Windows, or worse yet multi-boot, this gets more complex.
_________________
Phil
Required reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions
Posted on: 2009/11/6 21:04
Create PDF from Post Print
Top
  •  ZaNaToS
      ZaNaToS
Re: What is the best way to setup Time?
#3
Peeking in the Member Window
Joined: 2007/8/23
From
Posts: 20
pschaff Thank you for your answer.

we also have DST here.

so if I understand correct I should keep the hdclock setup in UTC and my software clock in GMT+2?
I'm confused because the particular server is used for hosting and issues with wrong time affects many users.
Posted on: 2009/11/7 10:10
Create PDF from Post Print
Top
  •  markkuk
      markkuk
Re: What is the best way to setup Time?
#4
Professional Board Member
Joined: 2007/9/7
From Finland
Posts: 314
Quote:

ZaNaToS wrote:
so if I understand correct I should keep the hdclock setup in UTC

Yes.
Quote:

ZaNaToS wrote:
... and my software clock in GMT+2?

Only if you want to ignore DST changes and lock your time to UTC+2 always. If you want correct local time even when DST is in effect, choose the Europe/Athens timezone.
Posted on: 2009/11/7 13:42
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com