Ubuntu--Solving the problem of incorrect system time

Original URL: Ubuntu--Solving the problem of incorrect system time_IT Knives Out Blog-CSDN Blog

Introduction

illustrate

This article introduces how to solve the problem of incorrect Ubuntu system time.

How to check system time

Use the date command.

 

Scenario 1: Incorrect time zone

Problem Description

You can use this command to check the time zone: date -R, as follows:

We belong to the East Eighth District, so the final number should be: +0800. If not, our time zone is wrong.

Solution

1. List all time zones

timedatectl list-timezones

2. Find your time zone

Use Page Up or Page Down or the up and down keys to turn pages, as follows:

3. Set time zone

sudo timedatectl set-timezone Asia/Shanghai

Scenario 2: Time zone is correct, system time is incorrect

1.Install ntpdate

sudo apt-get install ntpdate

2. Synchronize time

sudo ntpdate cn.pool.ntp.org


 

Guess you like

Origin blog.csdn.net/feiying0canglang/article/details/128366634