4,496,302 th visitor since 2017.2.1 ( Today : 81 )
Computer ???
No. 426
Name. swindler
Subject. Timezone 변경
Main Cate. Linux
Sub Cate.
Date. 2013-05-14 16:32
Hit. 5286 (211.36.27.3)
File.
리눅스를 설치할 때 시간대(타임존;Timezone)를 맞추지 않으면, 컴퓨터 시계가 미국 태평양 시간인 PST로 나온다. (서머타임 기간에는 PDT.) 즉 캘리포니아 시간으로 나온다. 이것을 한국 표준시인 KST 로 변경하는 방법이다. 물론 다른 timezone으로도 변경할 수 있다.

(1) ls /usr/share/zoneinfo

zoneinfo 란 디렉토리의 내용을 ls 명령으로 보면 Asia 라는 디렉토리가 있다. 그리고

ls /usr/share/zoneinfo/Asia

이제 이렇게 쳐보면, Seoul 즉 '서울'이라는 파일이 있을 것이다. 배포본마다 조금씩 다를 수 있기 때문에 정확한 위치를 잘 파악한다.


(2) 이제 Seoul 이라는 파일에 대한 심볼릭 링크를 /etc/localtime 이라는 이름으로 만든다.

ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

이제 date 명령을 쳐보면, 날짜 뒤에 PST나 PDT대신에, 한국 시간인 KST가 나올 것이다.

다시 미국 태평양 표준시 (PST; PDT)로 바꾸려면 다음과 같이 한다.
ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime


[바로가기 링크] : http://coolx.net/cboard/computer/426



swindler /etc/sysconfig/clock 도 관련이 있는듯 2014-04-04
swindler yum reinstall tzdata 로 해결했다는 사람도 있고, tzdata-update를 하면 /etc/sysconfig/clock을 참고해서 /etc/localtime을 갱신 2014-04-04
Name
Password
Comment
Copyright © 1999-2017, swindler. All rights reserved. 367,611 visitor ( 1999.1.8-2004.5.26 ), 2,405,771 ( -2017.01.31)

  2HLAB   2HLAB_Blog   RedToolBox   Omil   Omil_Blog