tzselect:交互式选择时区

一、命令简介

tzselect​命令用于交互式地选择系统时区。

Clip_2024-09-29_02-56-29

二、命令参数

三、命令示例

运行tzselect​命令后进入交互界面,依次选择大洲->国家->城市。

#输出命令
tzselect

Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
 1) Africa
 2) Americas
 3) Antarctica
 4) Asia
 5) Atlantic Ocean
 6) Australia
 7) Europe
 8) Indian Ocean
 9) Pacific Ocean
10) coord - I want to use geographical coordinates.
11) TZ - I want to specify the timezone using the Posix TZ format.
#输入选择 4

Please select a country whose clocks agree with yours.
 1) Afghanistan              20) Iran                     39) Palestine
 2) Antarctica               21) Iraq                     40) Philippines
 3) Armenia                  22) Israel                   41) Qatar
 4) Azerbaijan               23) Japan                    42) Réunion
 5) Bahrain                  24) Jordan                   43) Russia
 6) Bangladesh               25) Kazakhstan               44) Saudi Arabia
 7) Bhutan                   26) Korea (North)            45) Seychelles
 8) Brunei                   27) Korea (South)            46) Singapore
 9) Cambodia                 28) Kuwait                   47) Sri Lanka
10) China                    29) Kyrgyzstan               48) Syria
11) Christmas Island         30) Laos                     49) Taiwan
12) Cocos (Keeling) Islands  31) Lebanon                  50) Tajikistan
13) Cyprus                   32) Macau                    51) Thailand
14) East Timor               33) Malaysia                 52) Turkmenistan
15) French S. Terr.          34) Mongolia                 53) United Arab Emirates
16) Georgia                  35) Myanmar (Burma)          54) Uzbekistan
17) Hong Kong                36) Nepal                    55) Vietnam
18) India                    37) Oman                     56) Yemen
19) Indonesia                38) Pakistan
#输入选择 10

Please select one of the following timezones.
1) Beijing Time
2) Xinjiang Time
#输入选择 1

The following information has been given:

        China
        Beijing Time

Therefore TZ='Asia/Shanghai' will be used.
Selected time is now:   Mon May 20 14:09:04 CST 2024.
Universal Time is now:  Mon May 20 06:09:04 UTC 2024.
Is the above information OK?
1) Yes
2) No
#输入选择 1

You can make this change permanent for yourself by appending the line
        TZ='Asia/Shanghai'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Shanghai

注意事项:

  • tzselect​命令提供了一个交互式界面,让用户可以从系统中可用的时区列表中选择一个时区。
  • 选择完成后,会显示所选时区的相关信息,并将其应用于系统。
  • 使用man tzselect​命令可以查看更多关于tzselect​命令的信息。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值