Set the time zone to Japan Standard Time

Introduction

When I ran ** date **, the system clock was out of order. Rather, it was 9 hours later than ** UTC (Coordinated Universal Time) ** because the time zone could not be set, so I will set it to Japan Standard Time. Japan's standard time is ** UTC + 09: 00 ** because there is a 9-hour time difference from Coordinated Universal Time.

environment

Ubuntu 16.04.5 LTS

procedure

Refer to the current time zone setting.

$timedatectl

      Local time: Mon 2020-01-06 05:04:33 UTC
  Universal time: Mon 2020-01-06 05:04:33 UTC
        RTC time: Mon 2020-01-06 05:04:33
       Time zone: Etc/UTC (UTC, +0000)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no
```

 Confirm that Japan Standard Time can be set.

```cmd
$timedatectl list-timezones | grep Tokyo

Asia/Tokyo
```

 Set to Japan Standard Time.

```cmd
$sudo timedatectl set-timezone Asia/Tokyo
```

 Make sure it is set correctly.

```cmd
timedatectl
      Local time: Mon 2020-01-06 14:06:12 JST
  Universal time: Mon 2020-01-06 05:06:12 UTC
        RTC time: Mon 2020-01-06 05:06:12
       Time zone: Asia/Tokyo (JST, +0900)
 Network time on: yes
NTP synchronized: no
RTC in local TZ: no
```

 Check that the system clock is displayed correctly.

```cmd
date
```

 When I checked the hardware clock, it was fixed together.

```cmd
hwclock -r
```

# Reference article

https://qiita.com/koara-local/items/32b004c0bf80fd70777c



Recommended Posts

Set the time zone to Japan Standard Time
How to set the server time to Japanese time
Convert the world time zone time string to Japan time without calculating the time difference with python.
Time zone
Apply the error propagation formula to the standard error
How to use MkDocs for the first time
Set the range of active strips to the preview range
I want to manage systemd by time zone! !!
Try posting to Qiita for the first time
How to execute a schedule by specifying the Python time zone and execution frequency
It's time to seriously think about the definition and skill set of data scientists
Change the time zone with Docker in Oracle Database
Flow memo to move LOCUST for the time being
Molecular dynamics simulation to try for the time being
Set the form DateField to type = date in Django
[Blender] How to dynamically set the selection of EnumProperty
Next to Excel, for the time being, jupyter notebook
Set the specified column of QTableWidget to ReadOnly StyledItemDelegate
[Introduction to Udemy Python3 + Application] 30. How to use the set
I read the Chainer reference (updated from time to time)
The road to Pythonista
The road to Djangoist
Define a task to set the fabric env in YAML
Change the Amazon Linux locale to Japan using Ansible's lineinfile
I want to move selenium for the time being [for mac]
Inherit the standard library to find the average value of Queue
Change the standard output destination to a file in Python
How to set the html class attribute in Django's forms.py
I tried to illustrate the time and time in C language
[Introduction to matplotlib] Read the end time from COVID-19 data ♬
I tried to display the time and today's weather w
Display the time in Django according to the user's region (UTC)
I want to convert an ISO-8601 character string to Japan time
How to set the extended iso8601 format date to the Dataframe index
[Introduction to Reinforcement Learning] Reinforcement learning to try moving for the time being
The story that the private key is set to 600 with chmod
I want to create a Dockerfile for the time being.