본문 바로가기
인프라/AWS

EC2 한국시간으로 타임존(timeZone) 설정하기

by jungmin.park 2024. 1. 8.

처음 EC2 인스턴스를 할당받으면

다음과 같이 할당되어있다 이를 바꾸기 위한 방법을 기록한다.

ubuntu@ip-172-xx-xxx-xxx:~$ date
Mon Jan  8 09:29:51 UTC 2024
  1. sudo ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
  2. sudo timedatectl set-timezone 'Asia/Seoul'
  3. tzselect
  4. 4 > 23 > 1
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa							     7) Europe
2) Americas							     8) Indian Ocean
3) Antarctica							     9) Pacific Ocean
4) Asia								    10) coord - I want to use geographical coordinates.
5) Atlantic Ocean						    11) TZ - I want to specify the timezone using the Posix TZ format.
6) Australia
#? 4
Please select a country whose clocks agree with yours.
 1) Afghanistan		     13) Cyprus			  25) Kazakhstan	       37) Oman			    49) Taiwan
 2) Antarctica		     14) East Timor		  26) Korea (North)	       38) Pakistan		    50) Tajikistan
 3) Armenia		     15) French S. Terr.	  27) Korea (South)	       39) Palestine		    51) Thailand
 4) Azerbaijan		     16) Georgia		  28) Kuwait		       40) Philippines		    52) Turkmenistan
 5) Bahrain		     17) Hong Kong		  29) Kyrgyzstan	       41) Qatar		    53) United Arab Emirates
 6) Bangladesh		     18) India			  30) Laos		       42) Russia		    54) Uzbekistan
 7) Bhutan		     19) Indonesia		  31) Lebanon		       43) Réunion		    55) Vietnam
 8) Brunei		     20) Iran			  32) Macau		       44) Saudi Arabia		    56) Yemen
 9) Cambodia		     21) Iraq			  33) Malaysia		       45) Seychelles
10) China		     22) Israel			  34) Mongolia		       46) Singapore
11) Christmas Island	     23) Japan			  35) Myanmar (Burma)	       47) Sri Lanka
12) Cocos (Keeling) Islands  24) Jordan			  36) Nepal		       48) Syria
#? 23

 

확인

ubuntu@ip-172-XX-XX-XXX:~$ date
Mon Jan  8 18:30:40 KST 2024