adjusting the hours

The time of my netBook is 3 hours more.
I’ve tried to set the time and region in two ways
1-by icon that appears on the taskbar
2-by YaST
I can set the time, but after a few minutes, the clock back to stay over three hours.
How do you adjust the time permanently?

Thanks in advance

Well, if the time changes back “automatically”, it’s likely caused by NTP (which regularly synchronizes your clock with some time server) I’d say.

Try to disable it in YaST->System->Date and Time or YaST->Network Services->NTP as a test.

That is indeed something to test.

And it would not be bad if you provided some hard information like:
What are the setings when it is wrong:

date

Tell what you changed from what into what.
Show the settings again after you changed them with the same command (and hopefully before they are changed back to the wrong settings.

And as you say you do this for the system (using YaST) and also for the user (by some icon in a desktop unidentified by you), which each have their own settings, please do so for both the user and for root.

Brazil is 3 hours behind GMT (UTC)

I think that you have set your system time to UTC by failing to set a TimeZone.

This is set in various places, each one over-riding the previous.

YaST → System → Date and Time

[KDE]
System Settings → Regional Settings → Date and Time → Timezone

Clock application – e.g. Digital Clock Settings → Time Zone

Try setting all of these to Brasil/São Paulo

I tested all the suggestions, no matter what mode I use to set the clock
In a few minutes after the adjustment, time continues to advance two hours;.
What else can I do?

So, where is the output I asked for?

In your first post you talked about three hours. No you talk about two hours.

You realy should post facts and not fairy tails.

Post the output of:

systemctl status ntpd
timedatectl

Sorry about my fault. the correct is three hours


sergio@linux-7vcz:~> date
Qua Out 12 11:38:42 UTC 2016

and after changes


sergio@linux-7vcz:~> date
Qua Out 12 08:39:48 UTC 2016

The result is :


sergio@linux-7vcz:~> systemctl status ntpd
ntpd.service - NTP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: active (running) since Qua 2016-10-12 08:27:26 UTC; 22min ago
     Docs: man:ntpd(1)
 Main PID: 22645 (ntpd)
   CGroup: /system.slice/ntpd.service
           ├─22645 /usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -g -u ntp:ntp -i /var/lib/ntp -c /etc/ntp...
           └─22646 ntpd: asynchronous dns resolver

So you didn’t disable NTP.

Run “sudo systemctl stop ntpd” and see whether the problem persists.
To disable it permanently run “sudo systemctl disable ntpd”.

If it helps, we know that NTP is causing your problem, and can further investigate.
Most likely it is some confusion between local time and UTC though, as already has been suggested.

So again, please also post the output of “timedatectl”.

Hm, “date” should show the time in local time, not UTC.
Where exactly did you set the time zone?
What’s the content of /etc/sysconfig/clock?

That change is not done correctly. Not only the time, but also the timezone (UTC) should have been changed. In fact is it so that you should change the timezone and the result will be that the time changes.

Thus you must explain what exactly you do between the two. No geneneric remarks: “and after changes”, but; "I executed this command:, or: "I started … and then clicked …, etc.

We can not look over your shoulder. We depend copmpletely on what you tell and show us. When you do not understand that, it is impossible to help you.

After executing the commands below, the clock shows the right time


linux-7vcz:/home/sergio # systemctl stop ntpd

linux-7vcz:/home/sergio # systemctl status ntpd
ntpd.service - NTP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: inactive (dead) since Qua 2016-10-12 18:35:13 UTC; 3min 0s ago
     Docs: man:ntpd(1)
 Main PID: 2461 (code=exited, status=0/SUCCESS)

Out 12 09:43:47 linux-7vcz systemd[1]: Stopping NTP Server Daemon...
Out 12 09:43:47 linux-7vcz systemd[1]: Starting NTP Server Daemon...
Out 12 09:43:47 linux-7vcz systemd[1]: Started NTP Server Daemon.
Out 12 09:43:47 linux-7vcz ntpd[2461]: proto: precision = 0.917 usec (-20)
Out 12 09:43:47 linux-7vcz ntpd[2461]: switching logging to file /var/log/ntp
Out 12 09:43:47 linux-7vcz start-ntpd[2450]: Starting network time protocol daemon (NTPD)
Out 12 09:43:47 linux-7vcz start-ntpd[2450]: Warning: /etc/localtime not found or not readable
Out 12 18:35:13 linux-7vcz systemd[1]: Stopping NTP Server Daemon...
Out 12 18:35:13 linux-7vcz systemd[1]: Stopped NTP Server Daemon.
Out 12 18:38:03 linux-7vcz systemd[1]: Stopped NTP Server Daemon.

linux-7vcz:/home/sergio # date
Qua Out 12 18:39:12 UTC 2016 

linux-7vcz:/home/sergio # systemctl stop ntpd

linux-7vcz:/home/sergio # systemctl status ntpd
ntpd.service - NTP Server Daemon
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: inactive (dead) since Qua 2016-10-12 18:35:13 UTC; 3min 0s ago
     Docs: man:ntpd(1)
 Main PID: 2461 (code=exited, status=0/SUCCESS)

Out 12 09:43:47 linux-7vcz systemd[1]: Stopping NTP Server Daemon...
Out 12 09:43:47 linux-7vcz systemd[1]: Starting NTP Server Daemon...
Out 12 09:43:47 linux-7vcz systemd[1]: Started NTP Server Daemon.
Out 12 09:43:47 linux-7vcz ntpd[2461]: proto: precision = 0.917 usec (-20)
Out 12 09:43:47 linux-7vcz ntpd[2461]: switching logging to file /var/log/ntp
Out 12 09:43:47 linux-7vcz start-ntpd[2450]: Starting network time protocol daemon (NTPD)
Out 12 09:43:47 linux-7vcz start-ntpd[2450]: Warning: /etc/localtime not found or not readable
Out 12 18:35:13 linux-7vcz systemd[1]: Stopping NTP Server Daemon...
Out 12 18:35:13 linux-7vcz systemd[1]: Stopped NTP Server Daemon.
Out 12 18:38:03 linux-7vcz systemd[1]: Stopped NTP Server Daemon.

linux-7vcz:/home/sergio # date
Qua Out 12 18:39:12 UTC 2016

linux-7vcz:/home/sergio # timedatectl
      Local time: Qua 2016-10-12 18:41:59 UTC
  Universal time: Qua 2016-10-12 18:41:59 UTC
        RTC time: Qua 2016-10-12 18:41:59
        Timezone: America/Sao_Paulo (UTC, +0000)
     NTP enabled: yes
NTP synchronized: no
 RTC in local TZ: yes

Warning: The RTC is configured to maintain time in the local timezone. This
         mode is not fully supported and will create various problems with time
         zone changes and daylight saving adjustments. If at all possible use
         RTC in UTC, by calling 'timedatectl set-local-rtc 0'.

linux-7vcz:/home/sergio # 

Now I must permanently disable using the command run “sudo systemctl disable ntpd”. ?

No! Disabling the NTP daemon was only for diagnostic purposes.

YaST → System → Date and Time
As well as setting thelocal Timezone to Brasil/São Paulo
Also set Hardware Clock Set to UTC

If you also boot your computer in to a very old version of Microsoft Windows, then you must tell us. It took Microsoft more than 20 years to learn about the Internet.

// I never use Microsoft Windows.//My NoteBook has only OpenSuse.//I’ve tried to set the local Timezone to Brasil/São Paulo and set Hardware Clock Set to UTC, but the problem persists.//So, I did not understand what should I do now to solve the problem of time.

I repeat in this thread for the last time:

This does not tell us anything when you say “I have tried to set …” when you do not explain exactly what you did. E.g. trying by staring to the keyboard will not help. We must know what you did else we can not correct you.

I quit this thread and whish all those who think they can help without sufficient information all the best.

** @sergelli:**
For example, on this openSUSE 13.2 machine, located in the Central European Time Zone, the values are:


 > cat /etc/sysconfig/clock
TIMEZONE="Europe/Berlin"
DEFAULT_TIMEZONE="Europe/Berlin"
 > 
 > l /etc/localtime
lrwxrwxrwx 1 root root 33 13. Okt 11:57 /etc/localtime -> /usr/share/zoneinfo/Europe/Berlin
 > 
 > file /usr/share/zoneinfo/Europe/Berlin
/usr/share/zoneinfo/Europe/Berlin: timezone data, version 2, 9 gmt time flags, 9 std time flags, no leap seconds, 145 transition times, 9 abbreviation chars
 > 
 > timedatectl
      Local time: Do 2016-10-13 12:58:03 CEST
  Universal time: Do 2016-10-13 10:58:03 UTC
        RTC time: Do 2016-10-13 10:58:04
        Timezone: Europe/Berlin (CEST, +0200)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
 > 
 > cat /etc/adjtime
0.0 0 0.0
0
UTC
 > 

Note: If /etc/adjtime is not present, systemd assumes the hardware clock is set to UTC.

One more thing: the format of the “/etc/adjtime” file is described in the ‘hwclock’ man page:

The adjtime file, while named for its historical purpose of controlling adjustments only, actually contains other information for use by hwclock in remembering information from one invocation to the next.

The format of the adjtime file is, in ASCII:

Line 1: 3 numbers, separated by blanks: 1) systematic drift rate in seconds per day, floating point decimal; 2) Resulting number of seconds since 1969 UTC of most recent adjustment or calibration, decimal integer; 3) zero (for compatibility with clock(8)) as a decimal integer.

Line 2: 1 number: Resulting number of seconds since 1969 UTC of most recent calibration. Zero if there has been no calibration yet or it is known that any previous calibration is moot (for example, because the Hardware Clock has been found, since that calibration, not to contain a valid time). This is a decimal integer.

Line 3: “UTC” or “LOCAL”. Tells whether the Hardware Clock is set to Coordinated Universal Time or local time. You can always override this value with options on the hwclock command line.

So it is indeed caused by the NTP daemon.
You can disable it if you don’t want to have your clock being adjusted automatically, either by the command given before, or in YaST.
Or we can try to fix the actual problem.

It seems to be that the timezone is actually not set:


Out 12 09:43:47 linux-7vcz start-ntpd[2450]: Starting network time protocol daemon (NTPD)
Out 12 09:43:47 linux-7vcz start-ntpd[2450]: Warning: /etc/localtime not found or not readable

i.e. /etc/localtime (which should point to the system time zone) doesn’t exist or is broken.

Setting the timezone in YaST->System->Date and Time should fix that.
And as already suggested, it is preferred to have the hardware clock in UTC, especially if you are not using Windows.
There’s a switch for that too in YaST.

Sorry, but I do not know what exactly you want me to do.
I think making a video of the movements that I change a simple computer date is somewhat exaggerated.
Everyone knows that we can set the date and time settings using YaST or by clicking on the clock icon on the taskbar.
Since there Nothing happened different from the usual, I thought was useless detail how I did the settings.

I’m saying this to you with all due respect that you deserve, because I know that I need your help

Thanks for your time.