|
|
root@ubuntu:~# tzselect
$ P- j% {8 ]- F/ A8 Z Q, l. CPlease identify a location so that time zone rules can be set correctly.
6 o: [5 Z7 Y6 ~$ Y* q! ^Please select a continent, ocean, "coord", or "TZ"." B5 }6 @# u& s U# E5 w+ E
1) Africa
' h# f* j1 n4 x5 Q8 ~5 S) f 2) Americas- ^8 v! R% [6 G4 ^3 D; `
3) Antarctica- t% {, Y3 F4 L' I& Y
4) Asia$ d! S. ]0 ?# _( z
5) Atlantic Ocean4 v I" U9 X6 l
6) Australia
1 h9 `0 n" C6 t; p" j: q 7) Europe
0 |/ t k. L, ]' Z3 L% f6 M% G3 P 8) Indian Ocean5 p n) F8 Q C; L& \
9) Pacific Ocean
6 h+ N- W6 g' g0 Y- D# f* [/ C$ R10) coord - I want to use geographical coordinates.! @2 Z9 F: [$ b4 N( y
11) TZ - I want to specify the timezone using the Posix TZ format.4 P+ a$ ?8 L$ ~
#? 4
j) g6 M$ v9 Y" ^Please select a country whose clocks agree with yours.& i$ l2 p! m4 A" ^
1) Afghanistan 18) Israel 35) Palestine
# ^2 o( R O y T' w6 t 2) Armenia 19) Japan 36) Philippines* U7 I/ D9 g( t; B
3) Azerbaijan 20) Jordan 37) Qatar8 `! h& ^* x1 X
4) Bahrain 21) Kazakhstan 38) Russia4 X6 T$ m/ y# X; P& T
5) Bangladesh 22) Korea (North) 39) Saudi Arabia& `/ @. q6 o: z, l, U
6) Bhutan 23) Korea (South) 40) Singapore
3 ?. c/ @& b- @- O& [. ^! p 7) Brunei 24) Kuwait 41) Sri Lanka. @( O1 v5 A( }$ a) g
8) Cambodia 25) Kyrgyzstan 42) Syria
' y0 W) r- Z. m$ D0 }3 t9 M* L 9) China 26) Laos 43) Taiwan0 @6 E, [" @! t' O* D* Y' ~/ C* T
10) Cyprus 27) Lebanon 44) Tajikistan
9 C' o" F$ S- B$ V, n6 F3 D6 D11) East Timor 28) Macau 45) Thailand% m3 N1 o9 B, ?* _
12) Georgia 29) Malaysia 46) Turkmenistan: S6 D% o% ^! X% l6 A9 G. ^
13) Hong Kong 30) Mongolia 47) United Arab Emirates
4 Y+ [/ H, w$ r4 N' P2 z14) India 31) Myanmar (Burma) 48) Uzbekistan
( n3 ~% a1 g6 r6 u7 w) J6 I9 a15) Indonesia 32) Nepal 49) Vietnam4 j/ h' ?6 I9 }- N8 V% [1 C4 N
16) Iran 33) Oman 50) Yemen$ U$ ^4 }3 l( J: g4 j
17) Iraq 34) Pakistan- U) j5 t, d1 k8 w. K' j4 f
#? 9
; u& _+ U" D; u, C. L p! @Please select one of the following timezones.% Z2 m0 @+ O4 H: S8 E3 X
1) Beijing Time
: h- u0 O! ~6 b1 E2) Xinjiang Time4 }0 {4 G: A7 X0 }/ O0 G+ a
#? 1
$ j, }8 W; A5 r' _% G3 eThe following information has been given:
7 j/ L% j. m9 C) M China
& R0 h. j4 s1 R+ D3 T2 r+ X! [ Beijing Time
5 ?0 e; G0 Z2 B; |; G: fTherefore TZ='Asia/Shanghai' will be used.
3 n) W- n7 P R7 |& G! uSelected time is now: Tue Jun 29 10:12:36 CST 2021.
2 E0 W+ R/ Y1 {Universal Time is now: Tue Jun 29 02:12:36 UTC 2021.
0 t$ @& n& P% a; z! C) h, GIs the above information OK?
8 ?7 m3 W3 y( r8 ]2 a" U8 X9 I6 A' Q1) Yes& o7 R4 i$ r/ |; ]. w- e
2) No
1 r/ \) \: h& t) S+ ]5 v#? 1
; t6 I1 x k! S$ R( dYou can make this change permanent for yourself by appending the line$ l/ h) A4 m) R7 E
TZ='Asia/Shanghai'; export TZ
$ Z/ X4 Z' Y5 Nto the file '.profile' in your home directory; then log out and log in again.' l4 _6 R! P! c$ N5 r
Here is that TZ value again, this time on standard output so that you
! e. Y( j& ?' L" _can use the /usr/bin/tzselect command in shell scripts:
* D+ j A4 v3 c/ _% c/ AAsia/Shanghai; A0 {) x6 F7 Z a0 S( q
root@ubuntu:~# date3 \5 \" N( ]" k$ C/ Q7 H% b
Tue 29 Jun 2021 10:12:46 AM CST
5 i4 X* @4 E& F; f0 @& j& b$ s5 t: e
9 u5 ^) o4 C& r# r9 L& k或者cp timezonf文件:
* P8 v) x$ E1 S* i4 [6 H cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime + H2 y4 l m0 i7 l
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# G: ?3 `% b8 m2 u; d, Y |
|