timezones/clock - Printable Version +- Linux-Noob Forums (https://www.linux-noob.com/forums) +-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html) +--- Forum: How Do I? (https://www.linux-noob.com/forums/forum-60.html) +--- Thread: timezones/clock (/thread-270.html) |
timezones/clock - inittux - 2011-11-07 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 timezones/clock - inittux - 2011-11-07 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. timezones/clock - hybrid - 2011-11-07 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 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. timezones/clock - inittux - 2011-11-24 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. timezones/clock - hybrid - 2011-11-24 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 It's the same on other Unix-like operating systems too, like Mac OS X: Code: Apollo:~ Peter$ uname -a timezones/clock - inittux - 2011-11-24 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/ timezones/clock - hybrid - 2011-11-24 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. timezones/clock - inittux - 2011-11-24 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 :) |