1

I did a clean install of Ubuntu 18.04 LTS on my laptop a couple of days back. During installation, I chose the timezone to be my local time zone i.e., Kolkata, India (Indian Standard Time). However, after booting my system, the time and date are showing incorrect values.

Displayed values:

date: Sun Aug 11 2019 time: 06:21:xx

Actual values at that time:

date: Sat Aug 10 2019 time: 19:21:xx

Precisely, the displayed time is 11 hours ahead of the actual time.

wrong date and time

In Settings --> Date and Time, the Automatic Date and Time, and the Automatic Time Zones switches are also enabled.

auto-update-date-and-time-enabled

I found some articles on the internet using which I tried to analyze/fix the issue (Screenshots attached).

  1. Run timedatectl

                         Local time: Sun 2019-08-11 06:27:44 IST
                      Universal time: Sun 2019-08-11 00:57:44 UTC
                            RTC time: Sun 2019-08-11 00:57:44
                           Time zone: Asia/Kolkata (IST, +0530)
           System clock synchronized: yes
    systemd-timesyncd.service active: yes
                     RTC in local TZ: no
    
  2. Installed ntp

    $ sudo dpkg -s ntp | grep Status
    Status: install ok installed
    
  3. Run sudo ntpq -p

     0.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
     1.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
     2.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
     3.ubuntu.pool.n .POOL.          16 p    -   64    0    0.000    0.000   0.000
     ntp.ubuntu.com  .POOL.          16 p    -   64    0    0.000    0.000   0.000
    

    ntpq command output

  4. Run sudo nmap -p123 -sU -P0 localhost. I think it checks the status of UDP port 123.

    Starting Nmap 7.60 ( https://nmap.org ) at 2019-08-11 07:09 IST
    Nmap scan report for localhost (127.0.0.1)
    Host is up (0.00024s latency).
    
    PORT    STATE SERVICE
    123/udp open  ntp
    
    Nmap done: 1 IP address (1 host up) scanned in 0.33 seconds
    

    upd-port-123-status-check

What should be the next steps I need to perform to fix this issue?

  • Please do not post text as pictures. Copy from the terminal, and paste into the question. Please see askubuntu.com/editing-help#code on how to format command output. – vidarlo Aug 10 '19 at 14:19
  • Your ntpq output indicates that you can't reach any NTP servers. The reach column should have a non-zero value when NTP is able to reach remote servers, and optimally it should show 377 – vidarlo Aug 10 '19 at 14:20
  • @vidarlo How to fix these? – flamingo_stark Aug 10 '19 at 14:42
1

Looks like your BIOS clock is set to UTC+11:00 (as per RTC time in the output of timedatectl). Ubuntu (Unix-like system in general) by default considers the BIOS clock to be set at UTC time.

Enter BIOS while booting and set your BIOS clock to UTC time (i.e. 5.5 hours behind your local time).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.