- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
root@ubuntu:~# tzselect J9 j2 b9 j+ K* h' Q; c3 w( A- G! d
Please identify a location so that time zone rules can be set correctly.
. b# [. J( J7 J6 W/ s4 w4 b# OPlease select a continent, ocean, "coord", or "TZ".
3 b1 d5 l7 ]9 u# _ 1) Africa
" ^, K/ ?6 i+ E2 c! [5 N 2) Americas0 D! \2 E( Q# {! m
3) Antarctica4 |: F+ P: q5 |& `. m
4) Asia5 a6 ~4 l! v( }0 ^( ?
5) Atlantic Ocean8 `. y+ M# N3 [+ p- \
6) Australia
7 K* h' Q4 [& w/ H+ f# \! s 7) Europe/ \# q: B. L- b' a& c( v0 I, X
8) Indian Ocean
. x* d* f. C4 v# l1 b; ^6 @ 9) Pacific Ocean
0 U' w& C1 w+ Y8 T. p10) coord - I want to use geographical coordinates.
; r1 }' W$ K* p; }' J( H5 |- g11) TZ - I want to specify the timezone using the Posix TZ format.
! Z/ z8 |- m9 u9 m#? 4, [$ m6 X2 B3 y
Please select a country whose clocks agree with yours.
/ n. R3 q0 ~% t8 R2 v( n8 | 1) Afghanistan 18) Israel 35) Palestine5 m* P/ v# `, c0 t) z! ^
2) Armenia 19) Japan 36) Philippines
2 R6 s& A6 J- H7 f 3) Azerbaijan 20) Jordan 37) Qatar
4 L0 ]4 E2 @. {+ W 4) Bahrain 21) Kazakhstan 38) Russia8 }; H5 u1 w, k; P0 p, y
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
3 B$ i r8 h4 K/ J 6) Bhutan 23) Korea (South) 40) Singapore
7 |2 f$ g% Z5 k" j7 Y 7) Brunei 24) Kuwait 41) Sri Lanka P4 i% e4 N6 f' ^4 T7 \$ j2 j9 P
8) Cambodia 25) Kyrgyzstan 42) Syria
1 Q" Z- D( y2 i+ L8 V/ b# A5 H 9) China 26) Laos 43) Taiwan) c- w8 V, |- Y5 f0 Y6 k. R- ]4 [
10) Cyprus 27) Lebanon 44) Tajikistan
5 G. n& o p$ c4 N11) East Timor 28) Macau 45) Thailand+ i, C3 @, z% c1 S
12) Georgia 29) Malaysia 46) Turkmenistan& I8 e7 x7 S8 Z7 S1 W
13) Hong Kong 30) Mongolia 47) United Arab Emirates
3 W9 R/ s; U% `14) India 31) Myanmar (Burma) 48) Uzbekistan
, }* w0 n. K# c15) Indonesia 32) Nepal 49) Vietnam( w6 a+ g% Y# z; O! Q- c
16) Iran 33) Oman 50) Yemen
3 [0 k' L: r6 u. a) b4 n- m! I3 w; e17) Iraq 34) Pakistan6 K4 ?7 z. @, ` ~9 N0 L
#? 9% [! i& K5 r$ _" s6 _) ^
Please select one of the following timezones.
A- s: x. L) R( q' C. N/ @% S1) Beijing Time
" L; b9 M% @! G9 l2) Xinjiang Time
; w3 i( l5 S! M% I: A#? 1 t* r* h6 H; b- ]7 k
The following information has been given:
6 ~2 m9 U3 z8 c China
* ^+ h2 o2 q& w6 n Beijing Time& y+ L" \. O0 j2 G+ n# d
Therefore TZ='Asia/Shanghai' will be used.
$ `4 a% Q6 J0 q0 }5 m: `! d; r3 eSelected time is now: Tue Jun 29 10:12:36 CST 2021.( k7 i' e$ _- a% I/ @" c9 @* M1 Q$ I
Universal Time is now: Tue Jun 29 02:12:36 UTC 2021.: Z- k4 @% a, N2 m" R- J$ o1 _
Is the above information OK?
- t3 Y2 w& ]8 P' O) C3 K1) Yes
0 M# s. ?# A3 {0 Q. U9 P2) No
: F5 F! a. y4 N$ h#? 1. X& q; S: Z c& q( s6 L& Y) F
You can make this change permanent for yourself by appending the line9 z6 x; t0 u1 U X5 t( q/ l
TZ='Asia/Shanghai'; export TZ
* [1 g0 Z+ v( X0 x$ ]9 ~to the file '.profile' in your home directory; then log out and log in again.
`. Q3 V3 T1 t! c6 cHere is that TZ value again, this time on standard output so that you
3 B7 g1 N$ s/ g( R3 K0 M& s; `can use the /usr/bin/tzselect command in shell scripts:
$ Y I: }* r) V' x8 e$ l0 i0 cAsia/Shanghai1 ]+ ~& I$ v+ d: K" N/ [1 v
root@ubuntu:~# date5 C9 P- y9 V' o8 f
Tue 29 Jun 2021 10:12:46 AM CST! v) G% j# m) z" m
) y. }! l+ V2 D! v# g
0 g. U1 ]6 C6 J) O9 p* Y
或者cp timezonf文件:
: j/ w: V0 v$ t cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
( m" s. s4 i# g- dln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 7 @( f3 s. z/ u; _/ G
|
|