Recent Post»

Recent Comment»

« 2024/5 »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
05-09 12:40

 

'tzselect'에 해당되는 글 1

  1. 2017.06.05 시스템 타임존 확인 및 설정하기
 

시스템 타임존 확인 및 설정하기

Linux | 2017. 6. 5. 22:37 | Posted by 짱아
반응형

시스템 타임존 확인 및 설정하기

 

  • 시스템 타임존 확인 및 변경하기          

# timedatectl

 // 현재 설정된 타임존 확인

# timedatectl list-timezones

  // 시스템에서 설정 가능한 타임존 목록 확인

# timedatectl set-timezone Asia/Seoul

 // 타임존을 Asia/Seoul 로 설정

# timedatectl

 // 현재 설정된 타임존 확인

 

  • 사용자 타임존 확인 및 변경하기

$ date

 // 현재 설정된 타임존 확인

$ tzselect

 // 현재 설정 가능한 timezone 목록 확인

 // 5) Asia > 23) Koara (South) > 1) Yes

 // 타임존 환경변수 TZ에 대한 값 출력 및 이후 로그인 시 반영을 위한 안내

 // TZ='Asia/Seoul'; export TZ 을 아래 파일에 추가

 // ubuntu : .profile

 // centos : .profile 이 없을 경우 .bashrc 에 추가

$ vi .profile

TZ='Asia/Seoul'; export TZ

// 로그 아웃 이후 재로그인

$ date

 // 현재 설정된 타임존 확인위 1, 2를 통해 사용자와 시스템 타임존이 다를 수 있음

 

  • 위의 방법으로 사용자와 시스템 타임존이 다를 수 있음

root@ubuntu:~# echo $TZ

Africa/Algiers

ubuntu@ubuntu:~$ date  

Mon Jun  5 03:30:02 CET 2017  //TZ 환경변수에 의해 설정된 timezone

 

ubuntu@ubuntu:~$ timedatectl

Warning: ignoring the TZ variable, reading the system's timezone setting only.

 

     Local time: Mon 2017-06-05 11:30:08 KST

 Universal time: Mon 2017-06-05 02:30:08 UTC

       Timezone: Asia/Seoul (KST, +0900) // 시스템 타임존

    NTP enabled: yes

NTP synchronized: no

RTC in local TZ: no

     DST active: n/a

 

  • timedatectl 설명

항목

설명

Local time

현재 지역의 시간

Universal time

협정 세계시

RTC time

서버 하드웨어의 시계

Time zone

시간대

NTP enabled

NTP 활성화 여부

NTP synchronized

NTP로 동기화 되었는지 여부

RTC in local TZ

RTC 시계를 시스템 시계와 동일하게 사용할 것인지의 여부

DST active

DST(Daylight saving time, 썸머타임) 설정 여부

 

반응형
: