Having trouble setting system clock to UTC with NTP

Hello everyone. I’m having trouble setting the system clock to UTC using NTP through Yast. I managed to get the hardware clock to UTC via NTP extremely easily by just ticking the box during installation. However, I cant seem to set the system clock to UTC as well. I realize UTC isn’t technically a time zone, but I thought it might still be listed as a zone-neutral option in the list of time zones to choose from. I had a look in the /etc/sysconfig editor menu and found options that sounded like they’d do what I want, but I didn’t fully understand what the description of most of the options was saying. Can anyone help me out please?

KDE or Gnome user…?

Oh, forgot to say, sorry. It’s a server box so there is no desktop environment. I also posted the thread when I meant to just preview it. I was going to add

before I posted the question.

Is it set to sync with the NTP Daemon?
https://dl.dropboxusercontent.com/u/10573557/NTP_12.2/clock-time2-change.jpg

The “set hardware clock to UTC/Local” is indeed for storing the time from the system clock in the hardware clock at shutdown. And to retrieve it again from the hardware clock at boot. This to give the system a reasonable (hardware clocks are not that trustable) start of it’s time setting at boot. To be corrected asap by using NTP. UTC would be the only one needed, when not cross booting with Windows in Linux gave problems here. Thus you only might to want setting it to local in a cross booting environment.

The system clock (should) allways run(s) in UTC. That is the starting point from where all other times in the sytem are derived. NTP sets/corrects the system clock. That is allways UTC.

All times stored in e.g. directory entries (for file creation time, etc.) are allways in millisecs since the epoch and thus in UTC. Same for other places.

Only thing is that a local time can be set (in an environment variable) that is used by software that displays times (e.g. when you use the ls command, or the date command). There is a “default” setting for this local time on a system. But every user can set his/her own. Remember that different users can log in from different parts of the world and mostly want to see their local time and not the one that was set as local system time during installation.

And of course you, as user can set that at will:

henk@boven:~> date
do aug 15 15:00:09 CEST 2013
henk@boven:~> TZ=UTC date
do aug 15 13:00:14 UTC 2013
henk@boven:~> TZ=Beijing date
do aug 15 13:00:17 Beijing 2013
henk@boven:~>

Thus the two settings in YaST > System > Date and time are not realy related. The “Set hardware clock to UTC” (or not) has nothing to do with the time zone chosen on the rest of that window. But IIRC there were problems changing the time zone after installation. But as you did not even tell which version of openSUSE you use, it is a bit tedious for others to go and search for those reports.

Yes. It wasn’t until recently. I seem to recall that I couldn’t get my system to successfully connect with an NTPP server when I installed Suse a few months ago, but I had another try a few days ago and it worked, so now I intend to keep it synchronized via NTP. In fact I can’t even find where the option to stop NTP synchronization is any more. I don’t want to do stop it, I just realised I’d forgotten where it was.

For some reason, I wasn’t applying this simple and blindingly obvious bit of logic to the root user. So I take it that I if I just alter an environment variable it’ll just revert to the default value unless I change a file that specifies UTC as the default timezone?

Oh and I’m currently running 12.3, but I’m looking at switching to Tumbleweed.

Oh and I’m currently running 12.3, but I’m looking at switching to Tumbleweed.

For a sever?
I’m not sure that’s wise or even necessary…

I realised I was trying to find the timezone from a list of places in Europe and that’s why I couldn’t find the UTC timezone. I looked in the Etc section and there it was. So that’s that problem solved. Just my stupidity getting in the way as usual. I was considering trying Tumbleweed on my server because I just had a look on php.net and I noticed an announcement saying that the version of PHP that comes with 12.3 is reaching the end of it’s life. I had been noticing that a few features I wanted to try out were only in more recent versions of PHP. I guess you’re right about it being unwise, though. It may very well be nice to play with new features, but perhaps not worth running stable, yet immature software. Oh and the other reason was hopefully less downtime due to not having to upgrade to a newer version of Suse and reinstating any customizations made.

You could just upgrade PHP from this repo: (it contains 5.4.17 atm)
software.opensuse.org: Install package server:php / php5

On 2013-08-15 14:26, Stephen Philbin wrote:

>> Like for example the name of the setting “SYSTOHC” would suggest to me
>> that when the system boots the system clock is set the the value of the
>> hardware clock, but the description sys the opposite. The description
>> says that if set to “yes” (which it is by default) then the hardware
>> clock is overwritten with the value of the system clock at boot and
>> shutdown. Which is exactly the opposite of what I want to happen. But
>> the description goes on to say that this value is only used if
>> “boot.clock” is enabled. So I assume I don’t want to enable “boot.clock”
>> but I don’t want to mess with any options in case one of them ends up
>> enabling “boot.clock” before I posted the question.

You don’t need touching any of that. You only have to adjust the locale.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Nice one. Thanks. I’ll have a look and see if some if the features I wanted to try out are in that version.