Fork me on GitHub

ubuntu相关设置

修改时区

sudo dpkg-reconfigure tzdata

出现时区列表,按照提示选择“Asia/Shanghai”

结果如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Package configuration
┌───────────────────────┤ Configuring tzdata ├───────────────────────┐
│ Please select the city or region corresponding to your time zone. │
│ │
Time zone: │
│ │
│ Qyzylorda ↑ │
│ Rangoon ▒ │
│ Riyadh ▒ │
│ Sakhalin ▒ │
│ Samarkand ▒ │
│ Seoul ▒ │
│ Shanghai ▮ │
│ Singapore ▒ │
│ Srednekolymsk ▒ │
│ Taipei ↓ │
│ │
│ │
│ <Ok> <Cancel> │
│ │
└────────────────────────────────────────────────────────────────────┘
Current default time zone: 'Asia/Shanghai'
Local time is now: Mon Aug 15 00:11:59 CST 2016.
Universal Time is now: Sun Aug 14 16:11:59 UTC 2016.
ubuntu@master:~$ date
Mon Aug 15 00:12:13 CST 2016

------------- The endThanks for reading-------------