Skip to content

Instantly share code, notes, and snippets.

@lostandfound
Last active August 25, 2017 07:26
Show Gist options
  • Save lostandfound/307b800cfbe650c06c691ede9f29ec1f to your computer and use it in GitHub Desktop.
Save lostandfound/307b800cfbe650c06c691ede9f29ec1f to your computer and use it in GitHub Desktop.
タイムゾーンを日本に設定する。
#!/bin/sh
# タイムゾーンを日本に設定する。rootで実行すること
# 事前確認
ls -l /etc/localtime*
# バックアップしてから日本のタイムゾーンでlocaltimeを上書き
cp -rp /etc/localtime /etc/localtime.org && cp -rp /usr/share/zoneinfo/Japan /etc/localtime
# 事後確認
ls -l /etc/localtime*
date
# 上書き防止
echo -e 'ZONE="Asia/Tokyo"\nUTC=false' > /etc/sysconfig/clock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment