|
|
root@ubuntu:~# tzselect 7 G5 a- a, j R" O+ c& m
Please identify a location so that time zone rules can be set correctly.
|# c1 }5 S! J3 n* APlease select a continent, ocean, "coord", or "TZ".
6 z$ k8 Z5 Q. W 1) Africa
+ B; O5 u& b3 L9 \" x* F; B 2) Americas
: S% j0 e) {" N1 B! N8 f' g; p 3) Antarctica: d. |! b8 R) j5 f, N9 D
4) Asia+ T5 }9 g* x& v# Y$ ~& j; e$ M- ~
5) Atlantic Ocean6 t: k7 I3 R! t0 ^
6) Australia+ f$ E3 d: w! X
7) Europe+ V) d+ R" C* C v
8) Indian Ocean# ]; ?7 e- P8 S0 |' @. W; v
9) Pacific Ocean0 M$ |6 M5 o+ t& M$ ~
10) coord - I want to use geographical coordinates.
' [/ ]' J3 a$ a( l( e7 s11) TZ - I want to specify the timezone using the Posix TZ format.) j& _2 b- m$ h$ s& b
#? 42 n/ k3 E n6 c8 p- @6 a/ W
Please select a country whose clocks agree with yours. j" b6 @3 i; e
1) Afghanistan 18) Israel 35) Palestine Q, D: e; H* g7 r* Z0 x
2) Armenia 19) Japan 36) Philippines
6 E' T6 n; @& ~3 F, a/ p& Y 3) Azerbaijan 20) Jordan 37) Qatar
: {' A% J1 u- U% {6 J3 v( U 4) Bahrain 21) Kazakhstan 38) Russia% n3 Q8 u2 L% a( q! v; g S
5) Bangladesh 22) Korea (North) 39) Saudi Arabia
4 f x/ X$ x2 a# e/ r) K# f: l 6) Bhutan 23) Korea (South) 40) Singapore
5 T$ C* t. T- y* R- C& L3 j1 _" W/ F 7) Brunei 24) Kuwait 41) Sri Lanka
/ K2 k5 Y9 G4 f( Q 8) Cambodia 25) Kyrgyzstan 42) Syria
. l+ j& R: ~/ c( m0 ]6 S* R/ D 9) China 26) Laos 43) Taiwan9 ]3 x* I) C9 u* I
10) Cyprus 27) Lebanon 44) Tajikistan3 h8 T" V3 t; o" B" e5 l& X$ N
11) East Timor 28) Macau 45) Thailand
9 |# p" K" O& h1 B% e5 P; N12) Georgia 29) Malaysia 46) Turkmenistan
" q/ y& J+ q) O$ o! ^, T13) Hong Kong 30) Mongolia 47) United Arab Emirates& `( K/ W2 J. L; p. W7 x
14) India 31) Myanmar (Burma) 48) Uzbekistan/ C5 ~6 ]" f" @$ a, ^! i8 K
15) Indonesia 32) Nepal 49) Vietnam
- Y( Z0 ^2 d: y- m9 @. a16) Iran 33) Oman 50) Yemen, U7 X( \. h }! {- F
17) Iraq 34) Pakistan0 x0 z2 B/ R% w* a& [- ]# R7 [
#? 91 C* l; N. `+ E+ `
Please select one of the following timezones./ L6 O* ~! h: {: U9 @* b0 x7 \1 A( n
1) Beijing Time ?$ T7 ]4 f, j4 y; u" _ w+ e) M9 T
2) Xinjiang Time- l8 n& |4 K6 W$ l g
#? 13 ?, }( i4 ^" L4 W# F6 q0 m
The following information has been given:, u1 N/ n1 D1 c/ T' D q5 E- ?# }
China( _) Q g8 \# C% R0 J I
Beijing Time8 b) i1 ]% }2 B+ ]% R1 Q/ B2 a
Therefore TZ='Asia/Shanghai' will be used.% C0 Q" E3 v3 h( o7 k
Selected time is now: Tue Jun 29 10:12:36 CST 2021.6 Y( x; G0 B% D, B# c& P
Universal Time is now: Tue Jun 29 02:12:36 UTC 2021.. m& B2 L- x3 e* X
Is the above information OK?
( w: X5 F) J, L4 B8 l0 u- I1) Yes
" T1 ?% V; i7 ]/ o$ M2) No5 ?$ C, k; m* j$ j1 d
#? 1
7 ^/ }9 t3 j. pYou can make this change permanent for yourself by appending the line
6 @8 }" t! z: i( F TZ='Asia/Shanghai'; export TZ
9 ]' e" b' T, T0 B6 tto the file '.profile' in your home directory; then log out and log in again.
) B; W" t+ l: Y6 v* W/ M' O3 e! dHere is that TZ value again, this time on standard output so that you9 \, w1 Y0 _0 C7 C5 p0 e
can use the /usr/bin/tzselect command in shell scripts:
' E: \! Q* Y9 W% X3 ?+ YAsia/Shanghai# B+ e8 u; M1 \: V# t/ F" `
root@ubuntu:~# date
1 b! b3 J; A2 K5 W3 e$ M+ G/ m3 XTue 29 Jun 2021 10:12:46 AM CST
$ A6 c! u& X6 I5 U
2 ~ L5 k5 {3 P+ Z, B1 w. m* @- E; r) i3 S- W" s6 M
或者cp timezonf文件: ~& V$ X/ h7 t% Y* o+ F$ |. R
cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ' i# g5 Q' z* D4 f; Q
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
0 I" _2 R% G. R |
|