Author Topic: [How-to] Set The Correct Time.  (Read 26994 times)

0 Members and 3 Guests are viewing this topic.

Offline slimline66

  • Neuling
  • *
  • Posts: 29
[How-to] Set The Correct Time.
« on: 07. May 2013, 22:34:19 »
[edit:] I've added a how-to in the Manjaro wiki on setting the system's time:

https://wiki.manjaro.org/index.php?title=System_Time_Setting

handy

____________________________


Here's a quick guide from one novice to another who's clock doesn't show the correct time. As far as I'm aware, there is no way to make changes other than at the command line.

I'll just point out that in xfce my clock showed the correct time but was an hour in front. I'm also a complete novice at this and all info was found on this forum in one form or another. Also I don't completely understand what I did, but it works.

In the terminal, typing:
Code: [Select]
timedatectl status
brings up this info.

Code: [Select]
slimline@slimline-manjaro:~$ timedatectl status
      Local time: Tue 2013-05-07 20:39:52 BST
  Universal time: Tue 2013-05-07 19:39:52 UTC
        RTC time: Tue 2013-05-07 20:39:52
        Timezone: Europe/London (BST, +0100)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2013-03-31 00:59:59 GMT
                  Sun 2013-03-31 02:00:00 BST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2013-10-27 01:59:59 BST
                  Sun 2013-10-27 01:00:00 GMT

This is my present configuration. Previous to running the following commands, "Timezone" didn't show my location and, "NTP enabled" and "NTP synchronized" both read "no".

First type:
Code: [Select]
timedatectl set-ntp true
next display a list of timezones:
Code: [Select]
timedatectl list-timezones
choose yours then:
Code: [Select]
timedatectl set-timezone [your timezone]

eg. timedatectl set-timezone Europe/London

finally check that your your settings have updated:
Code: [Select]
timedatectl status
Your clock should show the correct time now ... well, mine does! 
« Last Edit: 08. May 2014, 06:57:20 by aaditya »

Offline StealthPenguin

  • Sr. Mitglied
  • ****
  • Posts: 296
  • When the student is ready, the master appears.
  • Branch: Stable
  • Desktop: Xfce
  • GPU Card: GTX 970
  • GPU driver: Proprietary
  • Kernel: Latest - x86
  • Skill: Advanced
Re: [How-to] Set The Correct Time.
« Reply #1 on: 07. May 2013, 22:38:32 »
I think running these 2 commands and rebooting the machine is just enough.  That's how I fixed the time issue in my Manjaro installation.   :-\

Code: [Select]
systemctl enable ntpd
Code: [Select]
systemctl enable ntpdate

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-to] Set The Correct Time.
« Reply #2 on: 08. May 2013, 02:50:03 »
Anyone who is dual/multi-booting with Windows, will benefit from having a look at this wiki page:

http://wiki.manjaro.org/index.php?title=Setting_up_Windows_NTP
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline slimline66

  • Neuling
  • *
  • Posts: 29
Re: [How-to] Set The Correct Time.
« Reply #3 on: 10. May 2013, 18:19:23 »
I think running these 2 commands and rebooting the machine is just enough.  That's how I fixed the time issue in my Manjaro installation.   :-\

Code: [Select]
systemctl enable ntpd
Code: [Select]
systemctl enable ntpdate

I think that my problem was that the timezone wasn't set ... although I do seem to remember setting it when installing manjaro.

I will be reinstalling manjaro later on this evening so I'll make a point of setting it to the correct zone then use your commands to see if that works the same as what I did.

Handy, thanks for that. I'm sure it will be very useful for some people, but for me, Windows is being given the boot! :D

Offline adrianhoohaha

  • Jr. Mitglied
  • **
  • Posts: 68
  • PHL
  • Branch: Stable
  • Desktop: Xfce 4
  • GPU Card: Nvidia GT 540M
  • GPU driver: non-free
  • Kernel: linux39-x64
  • Skill: Novice
Re: [How-to] Set The Correct Time.
« Reply #4 on: 10. May 2013, 18:30:54 »
Anyone who is dual/multi-booting with Windows, will benefit from having a look at this wiki page:

http://wiki.manjaro.org/index.php?title=Setting_up_Windows_NTP

are there any other way of setting the correct time in manjaro? i don't want too many programs installed on my windows 8 partition. when I still have my linux mint 14 installed, I have no problems with time. it doesn't matter if it uses localtime or ntp as long as the time is displayed correctly on both OS. i'm looking for a way around this problem in manjaro.

can i just set up NTP in manjaro?

Offline dante

  • Vollwertiges Mitglied
  • ***
  • Posts: 218
  • Branch: testing
  • Desktop: KDE
  • GPU Card: GeForce GTX 275
  • GPU driver: non-free
  • Kernel: Kernel39 SMP x64
  • Skill: Intermediate
Re: [How-to] Set The Correct Time.
« Reply #5 on: 10. May 2013, 21:12:25 »
With Dual Booting don't need install software for windows. Only what to you do is that the Hardware Clock is set to UTC and on Linux using localtime. In combination with ntp or timedatectl over the console you can set the System Time. I know this is not the best solution but works.

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-to] Set The Correct Time.
« Reply #6 on: 11. May 2013, 02:11:20 »
There is more than one way to skin this cat. Some work for some people & some don't. I know this from experience.

Using NTP on Windows, is really easy to do (following the link in the wiki page that I made) & I know from experience that it is perfectly reliable.

After that you won't have to mess with the inferior local time any more & Linux (or OS/X, or BSD) can just do its thing with UTC without having its time changed each time you boot into Windows.

The changes made to Windows will take up very little space on your drive, & once made you won't have to look at it again.
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline adrianhoohaha

  • Jr. Mitglied
  • **
  • Posts: 68
  • PHL
  • Branch: Stable
  • Desktop: Xfce 4
  • GPU Card: Nvidia GT 540M
  • GPU driver: non-free
  • Kernel: linux39-x64
  • Skill: Novice
Re: [How-to] Set The Correct Time.
« Reply #7 on: 11. May 2013, 16:44:20 »
There is more than one way to skin this cat. Some work for some people & some don't. I know this from experience.

Using NTP on Windows, is really easy to do (following the link in the wiki page that I made) & I know from experience that it is perfectly reliable.

After that you won't have to mess with the inferior local time any more & Linux (or OS/X, or BSD) can just do its thing with UTC without having its time changed each time you boot into Windows.

The changes made to Windows will take up very little space on your drive, & once made you won't have to look at it again.

maybe I'll try this when I get more proficient with linux. for the meantime, I'll just solve this problem by using ntp in manjaro. :D

Offline slimline66

  • Neuling
  • *
  • Posts: 29
Re: [How-to] Set The Correct Time.
« Reply #8 on: 11. May 2013, 21:41:52 »
Handy, can you shed any light on this? I've just done a complete reinstall of manjaro and this time my clock shows the correct time. During installation my timezone was set and yet the timedatectl status command shows similar info my first installation where the clock was 1 hour out.
Code: [Select]
slimline66@slimline66-manjaro:~$ timedatectl status
      Local time: Sat 2013-05-11 20:25:59 BST
  Universal time: Sat 2013-05-11 19:25:59 UTC
        RTC time: Sat 2013-05-11 20:25:59
        Timezone: n/a (BST, +0100)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: yes
 Last DST change: DST began at
                  Sun 2013-03-31 00:59:59 GMT
                  Sun 2013-03-31 02:00:00 BST
 Next DST change: DST ends (the clock jumps one hour backwards) at
                  Sun 2013-10-27 01:59:59 BST
                  Sun 2013-10-27 01:00:00 GMT

Is there another process running that's keeping the clock at the correct time perhaps?

Offline dante

  • Vollwertiges Mitglied
  • ***
  • Posts: 218
  • Branch: testing
  • Desktop: KDE
  • GPU Card: GeForce GTX 275
  • GPU driver: non-free
  • Kernel: Kernel39 SMP x64
  • Skill: Intermediate
Re: [How-to] Set The Correct Time.
« Reply #9 on: 11. May 2013, 22:43:29 »
Location is London as I see you can set your Timezone with
Code: [Select]
sudo timedatectl set-timezone Europe/London

Also you can use ntp to get the network configuring /etc/ntp.conf as show below
Code: [Select]

server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org


And check if the Service running
Code: [Select]
systemctl status ntpd.service



Offline slimline66

  • Neuling
  • *
  • Posts: 29
Re: [How-to] Set The Correct Time.
« Reply #10 on: 12. May 2013, 00:08:38 »
LOL that's the info that I started this thread with. :)

The point of my question is that this time without doing all that, my clock shows the correct time! I was wondering if there is a default process running in this version of manjaro that takes care of the time.

As I said in the OP, the info you posted corrected the time which at that time was on hour out. Great minds eh! :)

Offline handy

  • Global Moderator
  • *****
  • Posts: 5738
  • Desktop: Openbox 3.6.1-3 & Worker :)
  • GPU Card: intel...
  • GPU driver: open-source
  • Kernel: OpenBSD
  • Skill: Intermediate
Re: [How-to] Set The Correct Time.
« Reply #11 on: 12. May 2013, 01:43:56 »
If you get your localisation right, then the time should be right. You have daylight saving happening, which will give you an hour difference - 00:59:59 it says in your output.

Beyond that I buggered if I know!
The ultimate tyranny in a society is not control
by martial law. It is control by the psychological
manipulation of consciousness, through which reality
is defined so that those who exist within do not even
realize that they are in prison.
  —  Barbara Marciniak

Offline acuvic

  • Neuling
  • *
  • Posts: 21
    • ABC of Websites
  • Branch: stable
  • Desktop: Xfce
  • GPU Card: Intel GMA950 Graphics
  • GPU driver: free
  • Kernel: linux312-x86
  • Skill: Novice
Re: [How-to] Set The Correct Time.
« Reply #12 on: 01. June 2013, 18:05:11 »
Thanks to slimline66, using his method, my clock is now BST. It was an hour behind (GMT I guess) before. No Windows dual boot, just another Linux (LinuxLite).

Offline moumin

  • Vollwertiges Mitglied
  • ***
  • Posts: 150
  • Branch: stable
  • Desktop: xfce 4.10
  • GPU Card: intel
  • GPU driver: free
  • Kernel: linux312-x64
  • Skill: Novice
Re: [How-to] Set The Correct Time.
« Reply #13 on: 13. June 2013, 18:09:30 »
Why doesn't manjaro have a time and date settings like any other system?!!

Offline Buddha

  • Vollwertiges Mitglied
  • ***
  • Posts: 129
  • By amending our mistakes, we get wisdom...
  • Branch: stable
  • Desktop: KDE
  • GPU Card: nvidia
  • GPU driver: non-free
  • Kernel: 3.15.6-1-MANJARO #1 SMP
  • Skill: Intermediate
Re: [How-to] Set The Correct Time.
« Reply #14 on: 15. June 2013, 21:48:19 »
I'm getting an error and not sure what to make of it.

Code: [Select]
$ sudo systemctl status ntpdate.service

ntpdate.service - One-Shot Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpdate.service; enabled)
   Active: failed (Result: exit-code) since Sat 2013-06-15 12:43:58 PDT; 15s ago
  Process: 9640 ExecStart=/usr/bin/ntpd -q -g -u ntp:ntp (code=exited, status=1/FAILURE)

Jun 15 12:43:58 manjaro-kde-x64 ntpd[9640]: ntpd 4.2.6p5@1.2349-o Mon May  6 10:20:10 UTC 2013 (1)
Jun 15 12:43:58 manjaro-kde-x64 ntpd[9640]: proto: precision = 0.109 usec
Jun 15 12:43:58 manjaro-kde-x64 systemd[1]: ntpdate.service: main process exited, code=exited, status=1/FAILURE
Jun 15 12:43:58 manjaro-kde-x64 systemd[1]: Failed to start One-Shot Network Time Service.
Jun 15 12:43:58 manjaro-kde-x64 systemd[1]: Unit ntpdate.service entered failed state.

I was looking at the info in this thread because once a day or so, my clock would change to some strange time even though in the UI all the settings are ok, like updating and time zone, etc.  it's all good.

So I tried some of the suggestions here, which seemed to work, my time is correct now, but I'm getting the error above.
Buddha

Quote
All philosophies are mental fabrications.
There has never been a single doctrine by which one could enter the true essence of things.
- Nagarjuna