Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
timezones/clock
#1

A while back I set my server time to the right time how they showed it here . I checked some logs and seem like the logs are all one hour off.

So instead of 12.30 it would show 11.30. So I decided I'd set the right timezone. I setup my clock like this:

 

vi /etc/sysconfig/clock

 

#ZONE="Europe/Amsterdam"

ZONE="GMT+1"

UTC=true

ARC=false

I rebooted. Didn't see a change

 

I also tried doing the following:

<strong>ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtimeStill have the same problem. I tried #</strong>ZONE="Europe/Amsterdam"and replacing it by #ZONE="GMT+1" Didn't change anything either,still off by an hour. I'm kind of out ideas and everything I searchin google they all point towards these configuration options.

 

When I use date it always still shows:

 

Mon Nov 7 11:44:17 CET 2011

So I'm probably just missing one thing. Cuz CET is Central Eastern time and I need GMT. Will keep search but ideas to help me in the right direction are welcome

Reply
#2

I solved it:

 

ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etclocaltime

 

vi set /etc/sysconfig/clock

ZONE="Europe/Amsterdam"

export TZ=Europe/Amsterdam

 

Now time is set to how I want it :)

 

Only thing is joomla error log that keeps a log of wrong log ins from the backend still is an hour off.

Changed under joomla server configuration to Amsterdam. Still no change. Will have to do for

now.

Reply
#3

Quote:Only thing is joomla error log that keeps a log of wrong log ins from the backend still is an hour off.Changed under joomla server configuration to Amsterdam. Still no change. Will have to do for

now.
 

Joomla may be relying on PHP's timezone setting, which is separate. Check the timezone settings for PHP in (I believe) /etc/php.ini. Search for date.timezone in the php.ini file and set that to the desired timezone as well.

Reply
#4

Still kind of confused. I did my timezone the redhat way and set the time. and when I do uname -a and date I still get two totally different outputs:

 

[maarten@localhost ~]$ uname -a

Linux localhost.localdomain 2.6.32-71.el6.i686 #1 SMP Fri Nov 12 04:17:17 GMT 2010 i686 i686 i386 GNU/Linux

[maarten@localhost ~]$ date

Thu Nov 24 19:35:43 CET 2011

[maarten@localhost ~]$

http://www.redhat.co...s/timezone.html

 

CET stands for Central European Time though.

Reply
#5

The time in the uname -a output refers to the time that the kernel was compiled, not the current time! You're expecting that value to be very different.

 



Code:
[peter@darkmatter ~]$ uname -a
Linux darkmatter.upfold.org.uk 2.6.32-131.17.1.el6.i686 #1 SMP Thu Oct 6 17:25:25 BST 2011 i686 i686 i386 GNU/Linux
[peter@darkmatter ~]$ date
Thu Nov 24 18:40:58 GMT 2011
[peter@darkmatter ~]$




 

It's the same on other Unix-like operating systems too, like Mac OS X:

 



Code:
Apollo:~ Peter$ uname -a
Darwin Apollo.local 11.2.0 Darwin Kernel Version 11.2.0: Tue Aug  9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 x86_64
Apollo:~ Peter$ date
Thu 24 Nov 2011 18:41:21 GMT




Reply
#6

I see now. There's now difference between CET en GMT. They are under the same zone. If I set it to

 

ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

 

Will it automatically do daylight savings time etc?

 

http://wwp.greenwich...-european-time/

Reply
#7
I'm not sure. If you set the zone to GMT specifically, it might stay at GMT permanently. If you were to set it to Europe/London, for example, I imagine it would switch you between GMT and BST depending on the time of year. Truthfully, this isn't something I've looked into hugely -- I've always set it and left it at install time.
Reply
#8

Quote:I'm not sure. If you set the zone to GMT specifically, it might stay at GMT permanently. If you were to set it to Europe/London, for example, I imagine it would switch you between GMT and BST depending on the time of year. Truthfully, this isn't something I've looked into hugely -- I've always set it and left it at install time.
 

Well I'll have to take close look at that another time. Keeping my time on Europe\Amsterdam for now cuz that's where home is :)

Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)