Results 1 to 8 of 8

Thread: Time issues

  1. #1
    Join Date
    Oct 2013
    Beans
    27

    Time issues

    (Taken from my previous post where I posted multiple questions and advised not to........)

    After a Fresh install of xubuntu 19.04, my clock is one hour slow, 1fallen suggested

    Quote Originally Posted by 1fallen

    Use timedatectl

    Code:
    sudo timedatectl set-timezone <timeszone>
    Examples:

    Timezone as EST

    Code:
    sudo timedatectl set-timezone EST
    Timezone as UTC

    Code:
    sudo timedatectl set-timezone UTC
    Listing all valid Timezones

    Code:
    timedatectl list-timezones
    This command is perfect for automation scripts since it doesn't require any user interaction while compared to any given answer based on dpkg-reconfigure tzdata
    Having followed those suggestions, this is my end result

    Code:
    mit@andora:~$ sudo dpkg-reconfigure tzdata
    
    Current default time zone: 'Europe/London'
    Local time is now:      Wed May 29 21:03:01 BST 2019.
    Universal Time is now:  Wed May 29 20:03:01 UTC 2019.
    My clock seem to be stuck UTC time

  2. #2
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Time issues

    Your using "systemd" now >>"timedatectl " is the tool to use.
    Have a look:
    Code:
    timedatectl  status
                   Local time: Wed 2019-05-29 14:44:20 MDT
               Universal time: Wed 2019-05-29 20:44:20 UTC
                     RTC time: Wed 2019-05-29 14:44:20
                    Time zone: America/Denver (MDT, -0600)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: yes
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  3. #3
    Join Date
    Oct 2013
    Beans
    27

    Re: Time issues

    Quote Originally Posted by 1fallen View Post
    Your using "systemd" now >>"timedatectl " is the tool to use.
    Have a look:
    Code:
    timedatectl  status
                   Local time: Wed 2019-05-29 14:44:20 MDT
               Universal time: Wed 2019-05-29 20:44:20 UTC
                     RTC time: Wed 2019-05-29 14:44:20
                    Time zone: America/Denver (MDT, -0600)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: yes
    Ok, looking at the bottom two lines in my output compared to yours would suggest that my NTP service is inactive

    Code:
    mit@andora:~$ timedatectl status
                   Local time: Wed 2019-05-29 21:51:03 BST
               Universal time: Wed 2019-05-29 20:51:03 UTC
                     RTC time: Wed 2019-05-29 20:51:03
                    Time zone: Europe/London (BST, +0100)
    System clock synchronized: yes
                  NTP service: inactive
              RTC in local TZ: no
    but if I look at the satus of ntp

    Code:
    sudo service ntp status
    [sudo] password for mit: 
    ● ntp.service - Network Time Service
       Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enab
       Active: active (running) since Wed 2019-05-29 19:36:23 BST; 2h 15min ago
         Docs: man:ntpd(8)
     Main PID: 19673 (ntpd)
        Tasks: 2 (limit: 4915)
       Memory: 2.8M
       CGroup: /system.slice/ntp.service
               └─19673 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 122:130
    
    
    May 29 21:42:02 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:43:06 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:44:13 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:45:18 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:46:25 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:47:31 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:48:37 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:49:43 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:50:48 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    May 29 21:51:55 andora ntpd[19673]: Soliciting pool server 2001:67c:1560:8003::c
    That says it is running???

    Think its time to go back to wind up clocks !!

  4. #4
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Time issues

    Quote Originally Posted by xendistar2 View Post

    Think its time to go back to wind up clocks !!
    Right??
    To start automatic time synchronization with remote NTP server, type the following command at the terminal.

    Code:
    # timedatectl set-ntp true
    To disable NTP time synchronization, type the following command at the terminal.

    Code:
    # timedatectl set-ntp false
    You have been fun, I've enoyed it.
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  5. #5
    Join Date
    Oct 2013
    Beans
    27

    Re: Time issues

    My Apologise, I have been busy and ill so I have put up with PC clock being an hour slow, but I am back now and my clock is still refusing to budge from being an hour behind, this is what I have currently

    Code:
    mit@andora:~$ timedatectl
                   Local time: Tue 2019-06-11 21:14:38 GMT
               Universal time: Tue 2019-06-11 21:14:38 UTC
                     RTC time: Tue 2019-06-11 21:14:38
                    Time zone: GMT (GMT, +0000)
    System clock synchronized: no
                  NTP service: inactive
              RTC in local TZ: no
    
    mit@andora:~$ sudo systemctl status ntp
    ● ntp.service - Network Time Service
       Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
       Active: inactive (dead)
         Docs: man:ntpd(8)
    
    mit@andora:~$ sudo systemctl restart ntp.service
    mit@andora:~$ sudo service ntp status
    ● ntp.service - Network Time Service
       Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
       Active: active (running) since Tue 2019-06-11 21:07:11 GMT; 21s ago
         Docs: man:ntpd(8)
      Process: 4336 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
     Main PID: 4356 (ntpd)
        Tasks: 2 (limit: 4915)
       Memory: 3.1M
       CGroup: /system.slice/ntp.service
               └─4356 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 122:130
    
    
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 2 lo 127.0.0.1:123
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 3 enp0s25 192.168.1.133:123
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 4 lo [::1]:123
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 5 enp0s25 [fdcc:f6ed:237c::5b2]:123
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 6 enp0s25 [fdcc:f6ed:237c:0:cdf9:76dc:bfeb:8eb
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 7 enp0s25 [fdcc:f6ed:237c:0:7e74:4a1b:930c:dbc
    Jun 11 21:07:11 andora ntpd[4356]: Listen normally on 8 enp0s25 [fe80::d56a:b06a:9117:3bf0%2]:123
    Jun 11 21:07:11 andora ntpd[4356]: Listening on routing socket on fd #25 for interface updates
    Jun 11 21:07:11 andora ntpd[4356]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
    Jun 11 21:07:11 andora ntpd[4356]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
    
    
    mit@andora:~$ sudo netstat -pl | grep ntp
    udp        0      0 andora.lan:ntp          0.0.0.0:*                           4356/ntpd           
    udp        0      0 localhost:ntp           0.0.0.0:*                           4356/ntpd           
    udp        0      0 0.0.0.0:ntp             0.0.0.0:*                           4356/ntpd           
    udp6       0      0 andora:ntp              [::]:*                              4356/ntpd           
    udp6       0      0 andora:ntp              [::]:*                              4356/ntpd           
    udp6       0      0 andora:ntp              [::]:*                              4356/ntpd           
    udp6       0      0 andora.lan:ntp          [::]:*                              4356/ntpd           
    udp6       0      0 ip6-localhost:ntp       [::]:*                              4356/ntpd           
    udp6       0      0 [::]:ntp                [::]:*                              4356/ntpd
    My Time zone is Europe\London

    Any suggestions?

  6. #6
    Join Date
    Aug 2016
    Location
    Wandering
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Time issues

    Ok I'm enjoying this less now, you took to long. (Jokingly)
    well now that you have it up and running use:
    Code:
    sudo timedatectl set-timezone Europe\London
    Sometimes it takes a reboot to see any change.
    And for fun only:
    Code:
    echo "Setting TimeZone..."
    export tz=`wget -qO - http://geoip.ubuntu.com/lookup | sed -n -e 's/.*<TimeZone>\(.*\)<\/TimeZone>.*/\1/p'` &&  timedatectl set-timezone $tz
    export tz=`timedatectl status| grep Timezone | awk '{print $2}'`
    echo "TimeZone set to $tz"
    This will query geoip.ubuntu.com from the server once it is started on the new network (the script checks for connectivity first course) and then sets the server's timezone based on the response.

    The "wget -q0 -" tells wget to output only the results to stdout which is then piped to the $tz variable.
    One of these just has to work for you.

    Hope it helps someone!
    With realization of one's own potential and self-confidence in one's ability, one can build a better world.
    Dalai Lama>>
    Code Tags

  7. #7
    Join Date
    Oct 2013
    Beans
    27

    Re: Time issues

    Quote Originally Posted by 1fallen View Post
    Ok I'm enjoying this less now, you took to long. (Jokingly)
    well now that you have it up and running use:
    I only took along time because my clock is slow

    OK Timezone set to Europe\London and ...................................my time is still 1 hour out

    BUT, when I rebooted the PC, on the sign on screen the time was showing as correct, but as soon as I login the clock displays the time as an hour out

  8. #8
    Join Date
    Oct 2013
    Beans
    27

    Re: Time issues

    Eureka, I found the issue.............

    When I checked with timedatectl it would give me the Time zone as Europe\London

    If I checked the time settings on XFCE it would give me Europe\London

    But if you right click on the clock in the panel and select properties

    The Time in that window was showing UK\London as the timezone

    Changed that to Europe\London and now my time is correct.

    While the timezone setting was set to UK\London while factually correct it was not a timezone that XFCE understood and it was easy to miss it.

    It seems very strange that the time and date module in XFCE setting (which was showing the correct timezone Europe\London) is not the only place where you can adjust the time & date, the right click properties on the clock really should be linked to the time and date module in XFCE setting so that there is only the one location other wise you can end up in the issue I had where one set of settings is blocking the other set of settings

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •